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 tostrands
list.addStrands
(Strand element) Adds one element tostrands
list.addStrands
(Strand... elements) Adds elements tostrands
list.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.AbstractDotBracket
instance.from
(DefaultDotBracket instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DefaultDotBracket
instance.from
(DotBracket instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DotBracket
instance.Initializes the value for thesequence
attribute.Sets or replaces all elements forstrands
list.Initializes the value for thestructure
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DefaultDotBracket
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.AbstractDotBracket
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DotBracket
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addStrands
Adds one element tostrands
list.- Parameters:
element
- A strands element- Returns:
this
builder for use in a chained invocation
-
addStrands
Adds elements tostrands
list.- Parameters:
elements
- An array of strands elements- Returns:
this
builder for use in a chained invocation
-
strands
Sets or replaces all elements forstrands
list.- Parameters:
elements
- An iterable of strands elements- Returns:
this
builder for use in a chained invocation
-
addAllStrands
Adds elements tostrands
list.- Parameters:
elements
- An iterable of strands elements- Returns:
this
builder for use in a chained invocation
-
sequence
Initializes the value for thesequence
attribute.- Parameters:
sequence
- The value for sequence- Returns:
this
builder for use in a chained invocation
-
structure
Initializes the value for thestructure
attribute.- Parameters:
structure
- The value for structure- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableDefaultDotBracket
.- Returns:
- An immutable instance of DefaultDotBracket
- Throws:
IllegalStateException
- if any required attributes are missing
-