Package pl.poznan.put.torsion
Class ImmutableTorsionAngleValue
- java.lang.Object
-
- pl.poznan.put.torsion.TorsionAngleValue
-
- pl.poznan.put.torsion.ImmutableTorsionAngleValue
-
- All Implemented Interfaces:
DisplayableExportable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableTorsionAngleValue extends TorsionAngleValue
Immutable implementation ofTorsionAngleValue.Use the builder to create immutable instances:
ImmutableTorsionAngleValue.builder(). Use the static factory method to create immutable instances:ImmutableTorsionAngleValue.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTorsionAngleValue.BuilderBuilds instances of typeImmutableTorsionAngleValue.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TorsionAngleTypeangleType()static ImmutableTorsionAngleValue.Builderbuilder()Creates a builder forImmutableTorsionAngleValue.static ImmutableTorsionAngleValuecopyOf(TorsionAngleValue instance)Creates an immutable copy of aTorsionAngleValuevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableTorsionAngleValuethat have equal attribute values.inthashCode()Computes a hash code from attributes:angleType,value.static ImmutableTorsionAngleValueof(TorsionAngleType angleType, Angle value)Construct a new immutableTorsionAngleValueinstance.StringtoString()Prints the immutable valueTorsionAngleValuewith attribute values.Anglevalue()ImmutableTorsionAngleValuewithAngleType(TorsionAngleType value)Copy the current immutable object by setting a value for theangleTypeattribute.ImmutableTorsionAngleValuewithValue(Angle value)Copy the current immutable object by setting a value for thevalueattribute.-
Methods inherited from class pl.poznan.put.torsion.TorsionAngleValue
exportName, longDisplayName, shortDisplayName
-
-
-
-
Method Detail
-
angleType
public TorsionAngleType angleType()
- Specified by:
angleTypein classTorsionAngleValue- Returns:
- The type of this torsion angle.
-
value
public Angle value()
- Specified by:
valuein classTorsionAngleValue- Returns:
- The value of this torsion angle.
-
withAngleType
public final ImmutableTorsionAngleValue withAngleType(TorsionAngleType value)
Copy the current immutable object by setting a value for theangleTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for angleType- Returns:
- A modified copy of the
thisobject
-
withValue
public final ImmutableTorsionAngleValue withValue(Angle value)
Copy the current immutable object by setting a value for thevalueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableTorsionAngleValuethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:angleType,value.
-
toString
public String toString()
Prints the immutable valueTorsionAngleValuewith attribute values.
-
of
public static ImmutableTorsionAngleValue of(TorsionAngleType angleType, Angle value)
Construct a new immutableTorsionAngleValueinstance.- Parameters:
angleType- The value for theangleTypeattributevalue- The value for thevalueattribute- Returns:
- An immutable TorsionAngleValue instance
-
copyOf
public static ImmutableTorsionAngleValue copyOf(TorsionAngleValue instance)
Creates an immutable copy of aTorsionAngleValuevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable TorsionAngleValue instance
-
builder
public static ImmutableTorsionAngleValue.Builder builder()
Creates a builder forImmutableTorsionAngleValue.ImmutableTorsionAngleValue.builder() .angleType(pl.poznan.put.torsion.TorsionAngleType) // requiredangleType.value(pl.poznan.put.circular.Angle) // requiredvalue.build();- Returns:
- A new ImmutableTorsionAngleValue builder
-
-