Package pl.poznan.put.pdb.analysis
Class ImmutableDefaultPdbResidue.Builder
java.lang.Object
pl.poznan.put.pdb.analysis.ImmutableDefaultPdbResidue.Builder
- Enclosing class:
- ImmutableDefaultPdbResidue
Builds instances of type
ImmutableDefaultPdbResidue
.
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 TypeMethodDescriptionaddAllAtoms
(Iterable<? extends PdbAtomLine> elements) Adds elements toatoms
list.addAtoms
(PdbAtomLine element) Adds one element toatoms
list.addAtoms
(PdbAtomLine... elements) Adds elements toatoms
list.atoms
(Iterable<? extends PdbAtomLine> elements) Sets or replaces all elements foratoms
list.build()
Builds a newImmutableDefaultPdbResidue
.from
(DefaultPdbResidue instance) Fill a builder with attribute values from the providedpl.poznan.put.pdb.analysis.DefaultPdbResidue
instance.from
(PdbResidue instance) Fill a builder with attribute values from the providedpl.poznan.put.pdb.analysis.PdbResidue
instance.identifier
(PdbResidueIdentifier identifier) Initializes the value for theidentifier
attribute.modifiedResidueName
(String modifiedResidueName) Initializes the value for themodifiedResidueName
attribute.standardResidueName
(String standardResidueName) Initializes the value for thestandardResidueName
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedpl.poznan.put.pdb.analysis.PdbResidue
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.DefaultPdbResidue
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
-
standardResidueName
Initializes the value for thestandardResidueName
attribute.- Parameters:
standardResidueName
- The value for standardResidueName- Returns:
this
builder for use in a chained invocation
-
modifiedResidueName
Initializes the value for themodifiedResidueName
attribute.- Parameters:
modifiedResidueName
- The value for modifiedResidueName- Returns:
this
builder for use in a chained invocation
-
addAtoms
Adds one element toatoms
list.- Parameters:
element
- A atoms element- Returns:
this
builder for use in a chained invocation
-
addAtoms
Adds elements toatoms
list.- Parameters:
elements
- An array of atoms elements- Returns:
this
builder for use in a chained invocation
-
atoms
Sets or replaces all elements foratoms
list.- Parameters:
elements
- An iterable of atoms elements- Returns:
this
builder for use in a chained invocation
-
addAllAtoms
public final ImmutableDefaultPdbResidue.Builder addAllAtoms(Iterable<? extends PdbAtomLine> elements) Adds elements toatoms
list.- Parameters:
elements
- An iterable of atoms elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableDefaultPdbResidue
.- Returns:
- An immutable instance of DefaultPdbResidue
- Throws:
IllegalStateException
- if any required attributes are missing
-