Package pl.poznan.put.pdb.analysis
Class ImmutablePdbChain.Builder
java.lang.Object
pl.poznan.put.pdb.analysis.ImmutablePdbChain.Builder
- Enclosing class:
- ImmutablePdbChain
Builds instances of type
ImmutablePdbChain
.
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 newImmutablePdbChain
.Fill a builder with attribute values from the providedpl.poznan.put.pdb.analysis.PdbChain
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.identifier
(String identifier) Initializes the value for theidentifier
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.PdbChain
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
-
identifier
Initializes the value for theidentifier
attribute.- Parameters:
identifier
- The value for identifier- 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
Adds elements toresidues
list.- Parameters:
elements
- An iterable of residues elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutablePdbChain
.- Returns:
- An immutable instance of PdbChain
- Throws:
IllegalStateException
- if any required attributes are missing
-