Package pl.poznan.put.pdb
Class ImmutablePdbAtomLine.Builder
java.lang.Object
pl.poznan.put.pdb.ImmutablePdbAtomLine.Builder
- Enclosing class:
- ImmutablePdbAtomLine
Builds instances of type
ImmutablePdbAtomLine
.
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 TypeMethodDescriptionalternateLocation
(String alternateLocation) Initializes the optional valuealternateLocation
to alternateLocation.alternateLocation
(Optional<String> alternateLocation) Initializes the optional valuealternateLocation
to alternateLocation.Initializes the value for theatomName
attribute.build()
Builds a newImmutablePdbAtomLine
.chainIdentifier
(String chainIdentifier) Initializes the value for thechainIdentifier
attribute.Initializes the value for thecharge
attribute.elementSymbol
(String elementSymbol) Initializes the value for theelementSymbol
attribute.from
(ChainNumberICode instance) Fill a builder with attribute values from the providedpl.poznan.put.pdb.ChainNumberICode
instance.from
(PdbAtomLine instance) Fill a builder with attribute values from the providedpl.poznan.put.pdb.PdbAtomLine
instance.insertionCode
(String insertionCode) Initializes the optional valueinsertionCode
to insertionCode.insertionCode
(Optional<String> insertionCode) Initializes the optional valueinsertionCode
to insertionCode.occupancy
(double occupancy) Initializes the value for theoccupancy
attribute.residueName
(String residueName) Initializes the value for theresidueName
attribute.residueNumber
(int residueNumber) Initializes the value for theresidueNumber
attribute.serialNumber
(int serialNumber) Initializes the value for theserialNumber
attribute.temperatureFactor
(double temperatureFactor) Initializes the value for thetemperatureFactor
attribute.x
(double x) Initializes the value for thex
attribute.y
(double y) Initializes the value for they
attribute.z
(double z) Initializes the value for thez
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedpl.poznan.put.pdb.ChainNumberICode
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.PdbAtomLine
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
serialNumber
Initializes the value for theserialNumber
attribute.- Parameters:
serialNumber
- The value for serialNumber- Returns:
this
builder for use in a chained invocation
-
atomName
Initializes the value for theatomName
attribute.- Parameters:
atomName
- The value for atomName- Returns:
this
builder for use in a chained invocation
-
alternateLocation
Initializes the optional valuealternateLocation
to alternateLocation.- Parameters:
alternateLocation
- The value for alternateLocation- Returns:
this
builder for chained invocation
-
alternateLocation
Initializes the optional valuealternateLocation
to alternateLocation.- Parameters:
alternateLocation
- The value for alternateLocation- Returns:
this
builder for use in a chained invocation
-
residueName
Initializes the value for theresidueName
attribute.- Parameters:
residueName
- The value for residueName- Returns:
this
builder for use in a chained invocation
-
chainIdentifier
Initializes the value for thechainIdentifier
attribute.- Parameters:
chainIdentifier
- The value for chainIdentifier- Returns:
this
builder for use in a chained invocation
-
residueNumber
Initializes the value for theresidueNumber
attribute.- Parameters:
residueNumber
- The value for residueNumber- Returns:
this
builder for use in a chained invocation
-
insertionCode
Initializes the optional valueinsertionCode
to insertionCode.- Parameters:
insertionCode
- The value for insertionCode- Returns:
this
builder for chained invocation
-
insertionCode
Initializes the optional valueinsertionCode
to insertionCode.- Parameters:
insertionCode
- The value for insertionCode- Returns:
this
builder for use in a chained invocation
-
x
Initializes the value for thex
attribute.- Parameters:
x
- The value for x- Returns:
this
builder for use in a chained invocation
-
y
Initializes the value for they
attribute.- Parameters:
y
- The value for y- Returns:
this
builder for use in a chained invocation
-
z
Initializes the value for thez
attribute.- Parameters:
z
- The value for z- Returns:
this
builder for use in a chained invocation
-
occupancy
Initializes the value for theoccupancy
attribute.- Parameters:
occupancy
- The value for occupancy- Returns:
this
builder for use in a chained invocation
-
temperatureFactor
Initializes the value for thetemperatureFactor
attribute.- Parameters:
temperatureFactor
- The value for temperatureFactor- Returns:
this
builder for use in a chained invocation
-
elementSymbol
Initializes the value for theelementSymbol
attribute.- Parameters:
elementSymbol
- The value for elementSymbol- Returns:
this
builder for use in a chained invocation
-
charge
Initializes the value for thecharge
attribute.- Parameters:
charge
- The value for charge- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutablePdbAtomLine
.- Returns:
- An immutable instance of PdbAtomLine
- Throws:
IllegalStateException
- if any required attributes are missing
-