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 class
Builds instances of typeImmutableMultiLineDotBracket
. -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends ClassifiedBasePair>
protected Collection<ClassifiedBasePair>
builder()
Creates a builder forImmutableMultiLineDotBracket
.static ImmutableMultiLineDotBracket
copyOf
(MultiLineDotBracket instance) Creates an immutable copy of aMultiLineDotBracket
value.boolean
This instance is equal to all instances ofImmutableMultiLineDotBracket
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sequence
,basePairs
.static ImmutableMultiLineDotBracket
of
(String sequence, Collection<? extends ClassifiedBasePair> basePairs) Construct a new immutableMultiLineDotBracket
instance.sequence()
withBasePairs
(Collection<? extends ClassifiedBasePair> value) Copy the current immutable object by setting a value for thebasePairs
attribute.withSequence
(String value) Copy the current immutable object by setting a value for thesequence
attribute.Methods inherited from class pl.poznan.put.structure.formats.MultiLineDotBracket
fromString, toString
-
Method Details
-
sequence
- Specified by:
sequence
in classMultiLineDotBracket
- Returns:
- The sequence of nucleotides.
-
basePairs
- Specified by:
basePairs
in classMultiLineDotBracket
- Returns:
- The list of base pairs.
-
withSequence
Copy the current immutable object by setting a value for thesequence
attribute. 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
this
object
-
withBasePairs
public final ImmutableMultiLineDotBracket withBasePairs(Collection<? extends ClassifiedBasePair> value) Copy the current immutable object by setting a value for thebasePairs
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableMultiLineDotBracket
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sequence
,basePairs
. -
basePairs5to3
Returns a lazily initialized value of the
basePairs5to3
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.- Overrides:
basePairs5to3
in classMultiLineDotBracket
- Returns:
- A lazily initialized value of the
basePairs5to3
attribute
-
of
public static ImmutableMultiLineDotBracket of(String sequence, Collection<? extends ClassifiedBasePair> basePairs) Construct a new immutableMultiLineDotBracket
instance.- Parameters:
sequence
- The value for thesequence
attributebasePairs
- The value for thebasePairs
attribute- Returns:
- An immutable MultiLineDotBracket instance
-
copyOf
Creates an immutable copy of aMultiLineDotBracket
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 MultiLineDotBracket instance
-
builder
Creates a builder forImmutableMultiLineDotBracket
.ImmutableMultiLineDotBracket.builder() .sequence(String) // required
sequence
.basePairs(Collection<? extends pl.poznan.put.structure.ClassifiedBasePair>) // requiredbasePairs
.build();- Returns:
- A new ImmutableMultiLineDotBracket builder
-