Package pl.poznan.put.torsion
Class ImmutableTorsionAngleDelta.Builder
java.lang.Object
pl.poznan.put.torsion.ImmutableTorsionAngleDelta.Builder
- Enclosing class:
- ImmutableTorsionAngleDelta
Builds instances of type
ImmutableTorsionAngleDelta
.
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 TypeMethodDescriptionangleType
(MasterTorsionAngleType angleType) Initializes the value for theangleType
attribute.build()
Builds a newImmutableTorsionAngleDelta
.Initializes the value for thedelta
attribute.from
(TorsionAngleDelta instance) Fill a builder with attribute values from the providedTorsionAngleDelta
instance.rangeDifference
(RangeDifference rangeDifference) Initializes the value for therangeDifference
attribute.state
(TorsionAngleDelta.State state) Initializes the value for thestate
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedTorsionAngleDelta
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
angleType
Initializes the value for theangleType
attribute.- Parameters:
angleType
- The value for angleType- Returns:
this
builder for use in a chained invocation
-
state
Initializes the value for thestate
attribute.- Parameters:
state
- The value for state- Returns:
this
builder for use in a chained invocation
-
delta
Initializes the value for thedelta
attribute.- Parameters:
delta
- The value for delta- Returns:
this
builder for use in a chained invocation
-
rangeDifference
Initializes the value for therangeDifference
attribute.- Parameters:
rangeDifference
- The value for rangeDifference- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableTorsionAngleDelta
.- Returns:
- An immutable instance of TorsionAngleDelta
- Throws:
IllegalStateException
- if any required attributes are missing
-