Package pl.poznan.put.structure.formats
Class ImmutableMultiLineDotBracket
java.lang.Object
pl.poznan.put.structure.formats.MultiLineDotBracket
pl.poznan.put.structure.formats.ImmutableMultiLineDotBracket
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableMultiLineDotBracket
extends MultiLineDotBracket
Immutable implementation of
MultiLineDotBracket.
Use the builder to create immutable instances:
ImmutableMultiLineDotBracket.builder().
Use the static factory method to create immutable instances:
ImmutableMultiLineDotBracket.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableMultiLineDotBracket. -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends ClassifiedBasePair>protected Collection<ClassifiedBasePair>builder()Creates a builder forImmutableMultiLineDotBracket.static ImmutableMultiLineDotBracketcopyOf(MultiLineDotBracket instance) Creates an immutable copy of aMultiLineDotBracketvalue.booleanThis instance is equal to all instances ofImmutableMultiLineDotBracketthat have equal attribute values.inthashCode()Computes a hash code from attributes:sequence,basePairs.static ImmutableMultiLineDotBracketof(String sequence, Collection<? extends ClassifiedBasePair> basePairs) Construct a new immutableMultiLineDotBracketinstance.sequence()withBasePairs(Collection<? extends ClassifiedBasePair> value) Copy the current immutable object by setting a value for thebasePairsattribute.withSequence(String value) Copy the current immutable object by setting a value for thesequenceattribute.Methods inherited from class pl.poznan.put.structure.formats.MultiLineDotBracket
fromString, toString
-
Method Details
-
sequence
- Specified by:
sequencein classMultiLineDotBracket- Returns:
- The sequence of nucleotides.
-
basePairs
- Specified by:
basePairsin classMultiLineDotBracket- Returns:
- The list of base pairs.
-
withSequence
Copy the current immutable object by setting a value for thesequenceattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sequence- Returns:
- A modified copy of the
thisobject
-
withBasePairs
public final ImmutableMultiLineDotBracket withBasePairs(Collection<? extends ClassifiedBasePair> value) Copy the current immutable object by setting a value for thebasePairsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for basePairs- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableMultiLineDotBracketthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sequence,basePairs. -
basePairs5to3
Returns a lazily initialized value of the
basePairs5to3attribute. 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.- Overrides:
basePairs5to3in classMultiLineDotBracket- Returns:
- A lazily initialized value of the
basePairs5to3attribute
-
of
public static ImmutableMultiLineDotBracket of(String sequence, Collection<? extends ClassifiedBasePair> basePairs) Construct a new immutableMultiLineDotBracketinstance.- Parameters:
sequence- The value for thesequenceattributebasePairs- The value for thebasePairsattribute- Returns:
- An immutable MultiLineDotBracket instance
-
copyOf
Creates an immutable copy of aMultiLineDotBracketvalue. 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 MultiLineDotBracket instance
-
builder
Creates a builder forImmutableMultiLineDotBracket.ImmutableMultiLineDotBracket.builder() .sequence(String) // requiredsequence.basePairs(Collection<? extends pl.poznan.put.structure.ClassifiedBasePair>) // requiredbasePairs.build();- Returns:
- A new ImmutableMultiLineDotBracket builder
-