Package pl.poznan.put.torsion
Class ImmutableTorsionAngleValue.Builder
- java.lang.Object
-
- pl.poznan.put.torsion.ImmutableTorsionAngleValue.Builder
-
- Enclosing class:
- ImmutableTorsionAngleValue
@NotThreadSafe public static final class ImmutableTorsionAngleValue.Builder extends Object
Builds instances of typeImmutableTorsionAngleValue. 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 ImmutableTorsionAngleValue.BuilderangleType(TorsionAngleType angleType)Initializes the value for theangleTypeattribute.ImmutableTorsionAngleValuebuild()Builds a newImmutableTorsionAngleValue.ImmutableTorsionAngleValue.Builderfrom(TorsionAngleValue instance)Fill a builder with attribute values from the providedTorsionAngleValueinstance.ImmutableTorsionAngleValue.Buildervalue(Angle value)Initializes the value for thevalueattribute.
-
-
-
Method Detail
-
from
public final ImmutableTorsionAngleValue.Builder from(TorsionAngleValue instance)
Fill a builder with attribute values from the providedTorsionAngleValueinstance. 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 ImmutableTorsionAngleValue.Builder angleType(TorsionAngleType angleType)
Initializes the value for theangleTypeattribute.- Parameters:
angleType- The value for angleType- Returns:
thisbuilder for use in a chained invocation
-
value
public final ImmutableTorsionAngleValue.Builder value(Angle value)
Initializes the value for thevalueattribute.- Parameters:
value- The value for value- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTorsionAngleValue build()
Builds a newImmutableTorsionAngleValue.- Returns:
- An immutable instance of TorsionAngleValue
- Throws:
IllegalStateException- if any required attributes are missing
-
-