Package pl.poznan.put.torsion
Class ImmutableTorsionAngleDelta.Builder
- java.lang.Object
-
- pl.poznan.put.torsion.ImmutableTorsionAngleDelta.Builder
-
- Enclosing class:
- ImmutableTorsionAngleDelta
@NotThreadSafe public static final class ImmutableTorsionAngleDelta.Builder extends Object
Builds instances of typeImmutableTorsionAngleDelta. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableTorsionAngleDelta.BuilderangleType(MasterTorsionAngleType angleType)Initializes the value for theangleTypeattribute.ImmutableTorsionAngleDeltabuild()Builds a newImmutableTorsionAngleDelta.ImmutableTorsionAngleDelta.Builderdelta(Angle delta)Initializes the value for thedeltaattribute.ImmutableTorsionAngleDelta.Builderfrom(TorsionAngleDelta instance)Fill a builder with attribute values from the providedTorsionAngleDeltainstance.ImmutableTorsionAngleDelta.BuilderrangeDifference(RangeDifference rangeDifference)Initializes the value for therangeDifferenceattribute.ImmutableTorsionAngleDelta.Builderstate(TorsionAngleDelta.State state)Initializes the value for thestateattribute.
-
-
-
Method Detail
-
from
public final ImmutableTorsionAngleDelta.Builder from(TorsionAngleDelta instance)
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
public final ImmutableTorsionAngleDelta.Builder angleType(MasterTorsionAngleType angleType)
Initializes the value for theangleTypeattribute.- Parameters:
angleType- The value for angleType- Returns:
thisbuilder for use in a chained invocation
-
state
public final ImmutableTorsionAngleDelta.Builder state(TorsionAngleDelta.State state)
Initializes the value for thestateattribute.- Parameters:
state- The value for state- Returns:
thisbuilder for use in a chained invocation
-
delta
public final ImmutableTorsionAngleDelta.Builder delta(Angle delta)
Initializes the value for thedeltaattribute.- Parameters:
delta- The value for delta- Returns:
thisbuilder for use in a chained invocation
-
rangeDifference
public final ImmutableTorsionAngleDelta.Builder rangeDifference(RangeDifference rangeDifference)
Initializes the value for therangeDifferenceattribute.- Parameters:
rangeDifference- The value for rangeDifference- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTorsionAngleDelta build()
Builds a newImmutableTorsionAngleDelta.- Returns:
- An immutable instance of TorsionAngleDelta
- Throws:
IllegalStateException- if any required attributes are missing
-
-