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 class
Builds instances of typeImmutableCombinedStrand
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableCombinedStrand
.static ImmutableCombinedStrand
copyOf
(CombinedStrand instance) Creates an immutable copy of aCombinedStrand
value.boolean
This instance is equal to all instances ofImmutableCombinedStrand
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:inputStrands
.static ImmutableCombinedStrand
Construct a new immutableCombinedStrand
instance.static ImmutableCombinedStrand
Construct a new immutableCombinedStrand
instance.pairs()
strands()
symbols()
final ImmutableCombinedStrand
withInputStrands
(Iterable<? extends Strand> elements) Copy the current immutable object with elements that replace the content ofinputStrands
.final ImmutableCombinedStrand
withInputStrands
(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, isIsolated, isolatedSymbols, length, missingInternal, missingTerminal, originalIndex, pseudoknotOrder, sequence, sequence, structure, structure, toStringWithStrands
-
Method Details
-
inputStrands
- Specified by:
inputStrands
in 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
this
object
-
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
this
object
-
equals
This instance is equal to all instances ofImmutableCombinedStrand
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:inputStrands
. -
symbols
Returns a lazily initialized value of the
symbols
attribute. 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:
symbols
in interfaceDotBracket
- Overrides:
symbols
in classCombinedStrand
- Returns:
- A lazily initialized value of the
symbols
attribute
-
strands
Returns a lazily initialized value of the
strands
attribute. 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:
strands
in interfaceDotBracket
- Overrides:
strands
in classCombinedStrand
- Returns:
- A lazily initialized value of the
strands
attribute
-
pairs
Returns a lazily initialized value of the
pairs
attribute. 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:
pairs
in interfaceDotBracket
- Overrides:
pairs
in classCombinedStrand
- Returns:
- A lazily initialized value of the
pairs
attribute
-
of
Construct a new immutableCombinedStrand
instance.- Parameters:
inputStrands
- The value for theinputStrands
attribute- Returns:
- An immutable CombinedStrand instance
-
of
Construct a new immutableCombinedStrand
instance.- Parameters:
inputStrands
- The value for theinputStrands
attribute- Returns:
- An immutable CombinedStrand instance
-
copyOf
Creates an immutable copy of aCombinedStrand
value. 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) //
inputStrands
elements .build();- Returns:
- A new ImmutableCombinedStrand builder
-