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 theangleTypeattribute.build()Builds a newImmutableTorsionAngleDelta.Initializes the value for thedeltaattribute.from(TorsionAngleDelta instance) Fill a builder with attribute values from the providedTorsionAngleDeltainstance.rangeDifference(RangeDifference rangeDifference) Initializes the value for therangeDifferenceattribute.state(TorsionAngleDelta.State state) Initializes the value for thestateattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedTorsionAngleDeltainstance. 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:
thisbuilder for use in a chained invocation
-
angleType
Initializes the value for theangleTypeattribute.- Parameters:
angleType- The value for angleType- Returns:
thisbuilder for use in a chained invocation
-
state
Initializes the value for thestateattribute.- Parameters:
state- The value for state- Returns:
thisbuilder for use in a chained invocation
-
delta
Initializes the value for thedeltaattribute.- Parameters:
delta- The value for delta- Returns:
thisbuilder for use in a chained invocation
-
rangeDifference
Initializes the value for therangeDifferenceattribute.- Parameters:
rangeDifference- The value for rangeDifference- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableTorsionAngleDelta.- Returns:
- An immutable instance of TorsionAngleDelta
- Throws:
IllegalStateException- if any required attributes are missing
-