Package pl.poznan.put.pdb.analysis
Class ImmutablePdbCompactFragment.Builder
java.lang.Object
pl.poznan.put.pdb.analysis.ImmutablePdbCompactFragment.Builder
- Enclosing class:
- ImmutablePdbCompactFragment
Builds instances of type
ImmutablePdbCompactFragment
.
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 TypeMethodDescriptionaddAllResidues
(Iterable<? extends PdbResidue> elements) Adds elements toresidues
list.addResidues
(PdbResidue element) Adds one element toresidues
list.addResidues
(PdbResidue... elements) Adds elements toresidues
list.build()
Builds a newImmutablePdbCompactFragment
.from
(PdbCompactFragment instance) Fill a builder with attribute values from the providedpl.poznan.put.pdb.analysis.PdbCompactFragment
instance.from
(ResidueCollection instance) Fill a builder with attribute values from the providedpl.poznan.put.pdb.analysis.ResidueCollection
instance.from
(SingleTypedResidueCollection instance) Fill a builder with attribute values from the providedpl.poznan.put.pdb.analysis.SingleTypedResidueCollection
instance.Initializes the value for thename
attribute.residues
(Iterable<? extends PdbResidue> elements) Sets or replaces all elements forresidues
list.
-
Method Details
-
from
Fill a builder with attribute values from the providedpl.poznan.put.pdb.analysis.SingleTypedResidueCollection
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.pdb.analysis.PdbCompactFragment
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.pdb.analysis.ResidueCollection
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addResidues
Adds one element toresidues
list.- Parameters:
element
- A residues element- Returns:
this
builder for use in a chained invocation
-
addResidues
Adds elements toresidues
list.- Parameters:
elements
- An array of residues elements- Returns:
this
builder for use in a chained invocation
-
residues
Sets or replaces all elements forresidues
list.- Parameters:
elements
- An iterable of residues elements- Returns:
this
builder for use in a chained invocation
-
addAllResidues
public final ImmutablePdbCompactFragment.Builder addAllResidues(Iterable<? extends PdbResidue> elements) Adds elements toresidues
list.- Parameters:
elements
- An iterable of residues elements- Returns:
this
builder for use in a chained invocation
-
name
Initializes the value for thename
attribute.If not set, this attribute will have a default value as returned by the initializer of
name
.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutablePdbCompactFragment
.- Returns:
- An immutable instance of PdbCompactFragment
- Throws:
IllegalStateException
- if any required attributes are missing
-