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 ofMultiLineDotBracket.Use the builder to create immutable instances:
ImmutableMultiLineDotBracket.builder(). Use the static factory method to create immutable instances:ImmutableMultiLineDotBracket.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableMultiLineDotBracket.BuilderBuilds instances of typeImmutableMultiLineDotBracket.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends ClassifiedBasePair>basePairs()protected Collection<ClassifiedBasePair>basePairs5to3()static ImmutableMultiLineDotBracket.Builderbuilder()Creates a builder forImmutableMultiLineDotBracket.static ImmutableMultiLineDotBracketcopyOf(MultiLineDotBracket instance)Creates an immutable copy of aMultiLineDotBracketvalue.booleanequals(Object another)This 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.Stringsequence()ImmutableMultiLineDotBracketwithBasePairs(Collection<? extends ClassifiedBasePair> value)Copy the current immutable object by setting a value for thebasePairsattribute.ImmutableMultiLineDotBracketwithSequence(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 Detail
-
sequence
public String sequence()
- Specified by:
sequencein classMultiLineDotBracket- Returns:
- The sequence of nucleotides.
-
basePairs
public Collection<? extends ClassifiedBasePair> basePairs()
- Specified by:
basePairsin classMultiLineDotBracket- Returns:
- The list of base pairs.
-
withSequence
public final ImmutableMultiLineDotBracket withSequence(String value)
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
public boolean equals(@Nullable Object another)
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
protected Collection<ClassifiedBasePair> 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
public static ImmutableMultiLineDotBracket copyOf(MultiLineDotBracket instance)
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
public static ImmutableMultiLineDotBracket.Builder 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
-
-