Package pl.poznan.put.structure.formats
Class ImmutableStrandView.Builder
java.lang.Object
pl.poznan.put.structure.formats.ImmutableStrandView.Builder
- Enclosing class:
- ImmutableStrandView
Builds instances of type
ImmutableStrandView
.
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 TypeMethodDescriptionaddAllCombineStrands
(Iterable<? extends DotBracket> elements) Adds elements tocombineStrands
list.addCombineStrands
(DotBracket element) Adds one element tocombineStrands
list.addCombineStrands
(DotBracket... elements) Adds elements tocombineStrands
list.begin
(int begin) Initializes the value for thebegin
attribute.build()
Builds a newImmutableStrandView
.combineStrands
(Iterable<? extends DotBracket> elements) Sets or replaces all elements forcombineStrands
list.end
(int end) Initializes the value for theend
attribute.from
(DotBracket instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DotBracket
instance.Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.Strand
instance.from
(StrandView instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.StrandView
instance.Initializes the value for thename
attribute.parent
(DotBracket parent) Initializes the value for theparent
attribute.
-
Method Details
-
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
-
from
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.Strand
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.StrandView
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addCombineStrands
Adds one element tocombineStrands
list.- Parameters:
element
- A combineStrands element- Returns:
this
builder for use in a chained invocation
-
addCombineStrands
Adds elements tocombineStrands
list.- Parameters:
elements
- An array of combineStrands elements- Returns:
this
builder for use in a chained invocation
-
combineStrands
Sets or replaces all elements forcombineStrands
list.- Parameters:
elements
- An iterable of combineStrands elements- Returns:
this
builder for use in a chained invocation
-
addAllCombineStrands
public final ImmutableStrandView.Builder addAllCombineStrands(Iterable<? extends DotBracket> elements) Adds elements tocombineStrands
list.- Parameters:
elements
- An iterable of combineStrands elements- Returns:
this
builder for use in a chained invocation
-
name
Initializes the value for thename
attribute.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
begin
Initializes the value for thebegin
attribute.- Parameters:
begin
- The value for begin- Returns:
this
builder for use in a chained invocation
-
end
Initializes the value for theend
attribute.- Parameters:
end
- The value for end- Returns:
this
builder for use in a chained invocation
-
parent
Initializes the value for theparent
attribute.- Parameters:
parent
- The value for parent- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableStrandView
.- Returns:
- An immutable instance of StrandView
- Throws:
IllegalStateException
- if any required attributes are missing
-