Package pl.poznan.put.structure.formats
Class ImmutableDefaultDotBracket.Builder
java.lang.Object
pl.poznan.put.structure.formats.ImmutableDefaultDotBracket.Builder
- Enclosing class:
- ImmutableDefaultDotBracket
Builds instances of type
ImmutableDefaultDotBracket.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllStrands(Iterable<? extends Strand> elements) Adds elements tostrandslist.addStrands(Strand element) Adds one element tostrandslist.addStrands(Strand... elements) Adds elements tostrandslist.build()Builds a newImmutableDefaultDotBracket.from(pl.poznan.put.structure.formats.AbstractDotBracket instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.AbstractDotBracketinstance.from(DefaultDotBracket instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DefaultDotBracketinstance.from(DotBracket instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DotBracketinstance.Initializes the value for thesequenceattribute.Sets or replaces all elements forstrandslist.Initializes the value for thestructureattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DefaultDotBracketinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableDefaultDotBracket.Builder from(pl.poznan.put.structure.formats.AbstractDotBracket instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.AbstractDotBracketinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DotBracketinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addStrands
Adds one element tostrandslist.- Parameters:
element- A strands element- Returns:
thisbuilder for use in a chained invocation
-
addStrands
Adds elements tostrandslist.- Parameters:
elements- An array of strands elements- Returns:
thisbuilder for use in a chained invocation
-
strands
Sets or replaces all elements forstrandslist.- Parameters:
elements- An iterable of strands elements- Returns:
thisbuilder for use in a chained invocation
-
addAllStrands
Adds elements tostrandslist.- Parameters:
elements- An iterable of strands elements- Returns:
thisbuilder for use in a chained invocation
-
sequence
Initializes the value for thesequenceattribute.- Parameters:
sequence- The value for sequence- Returns:
thisbuilder for use in a chained invocation
-
structure
Initializes the value for thestructureattribute.- Parameters:
structure- The value for structure- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableDefaultDotBracket.- Returns:
- An immutable instance of DefaultDotBracket
- Throws:
IllegalStateException- if any required attributes are missing
-