Class ImmutableCombinedStrand
- All Implemented Interfaces:
DotBracket
CombinedStrand.
Use the builder to create immutable instances:
ImmutableCombinedStrand.builder().
Use the static factory method to create immutable instances:
ImmutableCombinedStrand.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableCombinedStrand. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableCombinedStrand.static ImmutableCombinedStrandcopyOf(CombinedStrand instance) Creates an immutable copy of aCombinedStrandvalue.booleanThis instance is equal to all instances ofImmutableCombinedStrandthat have equal attribute values.inthashCode()Computes a hash code from attributes:inputStrands.static ImmutableCombinedStrandConstruct a new immutableCombinedStrandinstance.static ImmutableCombinedStrandConstruct a new immutableCombinedStrandinstance.pairs()strands()symbols()final ImmutableCombinedStrandwithInputStrands(Iterable<? extends Strand> elements) Copy the current immutable object with elements that replace the content ofinputStrands.final 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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface pl.poznan.put.structure.formats.DotBracket
containsMissing, findStrand, isIsolated, isolatedSymbols, length, missingInternal, missingTerminal, originalIndex, pseudoknotOrder, sequence, sequence, structure, structure, toStringWithStrands
-
Method Details
-
inputStrands
- Specified by:
inputStrandsin classCombinedStrand- Returns:
- The list of input strands.
-
withInputStrands
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
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
This instance is equal to all instances ofImmutableCombinedStrandthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:inputStrands. -
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
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
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
Construct a new immutableCombinedStrandinstance.- Parameters:
inputStrands- The value for theinputStrandsattribute- Returns:
- An immutable CombinedStrand instance
-
of
Construct a new immutableCombinedStrandinstance.- Parameters:
inputStrands- The value for theinputStrandsattribute- Returns:
- An immutable CombinedStrand instance
-
copyOf
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
Creates a builder forImmutableCombinedStrand.ImmutableCombinedStrand.builder() .addInputStrands|addAllInputStrands(pl.poznan.put.structure.formats.Strand) //inputStrandselements .build();- Returns:
- A new ImmutableCombinedStrand builder
-