Class ImmutableCombinedStrand
- java.lang.Object
-
- pl.poznan.put.structure.formats.AbstractCombinedStrand
-
- pl.poznan.put.structure.formats.CombinedStrand
-
- pl.poznan.put.structure.formats.ImmutableCombinedStrand
-
- All Implemented Interfaces:
DotBracket
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableCombinedStrand extends CombinedStrand
Immutable implementation ofCombinedStrand.Use the builder to create immutable instances:
ImmutableCombinedStrand.builder(). Use the static factory method to create immutable instances:ImmutableCombinedStrand.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCombinedStrand.BuilderBuilds instances of typeImmutableCombinedStrand.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCombinedStrand.Builderbuilder()Creates a builder forImmutableCombinedStrand.static ImmutableCombinedStrandcopyOf(CombinedStrand instance)Creates an immutable copy of aCombinedStrandvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCombinedStrandthat have equal attribute values.inthashCode()Computes a hash code from attributes:inputStrands.protected List<Strand>inputStrands()static ImmutableCombinedStrandof(Iterable<? extends Strand> inputStrands)Construct a new immutableCombinedStrandinstance.static ImmutableCombinedStrandof(List<Strand> inputStrands)Construct a new immutableCombinedStrandinstance.Map<DotBracketSymbol,DotBracketSymbol>pairs()List<Strand>strands()List<DotBracketSymbol>symbols()ImmutableCombinedStrandwithInputStrands(Iterable<? extends Strand> elements)Copy the current immutable object with elements that replace the content ofinputStrands.ImmutableCombinedStrandwithInputStrands(Strand... elements)Copy the current immutable object with elements that replace the content ofinputStrands.-
Methods inherited from class pl.poznan.put.structure.formats.CombinedStrand
combineStrands, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface pl.poznan.put.structure.formats.DotBracket
containsMissing, findStrand, length, missingInternal, missingTerminal, originalIndex, pseudoknotOrder, sequence, sequence, structure, structure, toStringWithStrands
-
-
-
-
Method Detail
-
inputStrands
protected List<Strand> inputStrands()
- Specified by:
inputStrandsin classCombinedStrand- Returns:
- The list of input strands.
-
withInputStrands
public final ImmutableCombinedStrand withInputStrands(Strand... elements)
Copy the current immutable object with elements that replace the content ofinputStrands.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withInputStrands
public final ImmutableCombinedStrand withInputStrands(Iterable<? extends Strand> elements)
Copy the current immutable object with elements that replace the content ofinputStrands. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of inputStrands elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCombinedStrandthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:inputStrands.
-
symbols
public List<DotBracketSymbol> symbols()
Returns a lazily initialized value of the
symbolsattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Specified by:
symbolsin interfaceDotBracket- Overrides:
symbolsin classCombinedStrand- Returns:
- A lazily initialized value of the
symbolsattribute
-
strands
public List<Strand> strands()
Returns a lazily initialized value of the
strandsattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Specified by:
strandsin interfaceDotBracket- Overrides:
strandsin classCombinedStrand- Returns:
- A lazily initialized value of the
strandsattribute
-
pairs
public Map<DotBracketSymbol,DotBracketSymbol> pairs()
Returns a lazily initialized value of the
pairsattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Specified by:
pairsin interfaceDotBracket- Overrides:
pairsin classCombinedStrand- Returns:
- A lazily initialized value of the
pairsattribute
-
of
public static ImmutableCombinedStrand of(List<Strand> inputStrands)
Construct a new immutableCombinedStrandinstance.- Parameters:
inputStrands- The value for theinputStrandsattribute- Returns:
- An immutable CombinedStrand instance
-
of
public static ImmutableCombinedStrand of(Iterable<? extends Strand> inputStrands)
Construct a new immutableCombinedStrandinstance.- Parameters:
inputStrands- The value for theinputStrandsattribute- Returns:
- An immutable CombinedStrand instance
-
copyOf
public static ImmutableCombinedStrand copyOf(CombinedStrand instance)
Creates an immutable copy of aCombinedStrandvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable CombinedStrand instance
-
builder
public static ImmutableCombinedStrand.Builder builder()
Creates a builder forImmutableCombinedStrand.ImmutableCombinedStrand.builder() .addInputStrands|addAllInputStrands(pl.poznan.put.structure.formats.Strand) //inputStrandselements .build();- Returns:
- A new ImmutableCombinedStrand builder
-
-