Package pl.poznan.put.structure.formats
Class ImmutableMultiLineDotBracket.Builder
- java.lang.Object
-
- pl.poznan.put.structure.formats.ImmutableMultiLineDotBracket.Builder
-
- Enclosing class:
- ImmutableMultiLineDotBracket
@NotThreadSafe public static final class ImmutableMultiLineDotBracket.Builder extends Object
Builds instances of typeImmutableMultiLineDotBracket. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableMultiLineDotBracket.BuilderbasePairs(Collection<? extends ClassifiedBasePair> basePairs)Initializes the value for thebasePairsattribute.ImmutableMultiLineDotBracketbuild()Builds a newImmutableMultiLineDotBracket.ImmutableMultiLineDotBracket.Builderfrom(MultiLineDotBracket instance)Fill a builder with attribute values from the providedMultiLineDotBracketinstance.ImmutableMultiLineDotBracket.Buildersequence(String sequence)Initializes the value for thesequenceattribute.
-
-
-
Method Detail
-
from
public final ImmutableMultiLineDotBracket.Builder from(MultiLineDotBracket instance)
Fill a builder with attribute values from the providedMultiLineDotBracketinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
sequence
public final ImmutableMultiLineDotBracket.Builder sequence(String sequence)
Initializes the value for thesequenceattribute.- Parameters:
sequence- The value for sequence- Returns:
thisbuilder for use in a chained invocation
-
basePairs
public final ImmutableMultiLineDotBracket.Builder basePairs(Collection<? extends ClassifiedBasePair> basePairs)
Initializes the value for thebasePairsattribute.- Parameters:
basePairs- The value for basePairs- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableMultiLineDotBracket build()
Builds a newImmutableMultiLineDotBracket.- Returns:
- An immutable instance of MultiLineDotBracket
- Throws:
IllegalStateException- if any required attributes are missing
-
-