Package pl.poznan.put.torsion
Class ImmutableTorsionAngleDelta
java.lang.Object
pl.poznan.put.torsion.TorsionAngleDelta
pl.poznan.put.torsion.ImmutableTorsionAngleDelta
- All Implemented Interfaces:
DisplayableExportable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableTorsionAngleDelta
extends TorsionAngleDelta
Immutable implementation of
TorsionAngleDelta.
Use the builder to create immutable instances:
ImmutableTorsionAngleDelta.builder().
Use the static factory method to create immutable instances:
ImmutableTorsionAngleDelta.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTorsionAngleDelta.Nested classes/interfaces inherited from class pl.poznan.put.torsion.TorsionAngleDelta
TorsionAngleDelta.State -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableTorsionAngleDelta.static ImmutableTorsionAngleDeltacopyOf(TorsionAngleDelta instance) Creates an immutable copy of aTorsionAngleDeltavalue.delta()booleanThis instance is equal to all instances ofImmutableTorsionAngleDeltathat have equal attribute values.inthashCode()Computes a hash code from attributes:angleType,state,delta,rangeDifference.static ImmutableTorsionAngleDeltaof(MasterTorsionAngleType angleType, TorsionAngleDelta.State state, Angle delta, RangeDifference rangeDifference) Construct a new immutableTorsionAngleDeltainstance.state()toString()Prints the immutable valueTorsionAngleDeltawith attribute values.Copy the current immutable object by setting a value for theangleTypeattribute.Copy the current immutable object by setting a value for thedeltaattribute.Copy the current immutable object by setting a value for therangeDifferenceattribute.withState(TorsionAngleDelta.State value) Copy the current immutable object by setting a value for thestateattribute.Methods inherited from class pl.poznan.put.torsion.TorsionAngleDelta
bothInvalidInstance, exportName, longDisplayName, shortDisplayName, subtractTorsionAngleValues, toString
-
Method Details
-
angleType
- Specified by:
angleTypein classTorsionAngleDelta- Returns:
- The type of torsion angle.
-
state
- Specified by:
statein classTorsionAngleDelta- Returns:
- The state of comparison depending on whether the inputs were valid or not.
-
delta
- Specified by:
deltain classTorsionAngleDelta- Returns:
- The actual result of subtraction.
-
rangeDifference
- Specified by:
rangeDifferencein classTorsionAngleDelta- Returns:
- The difference in terms of ranges the angles belong to.
-
withAngleType
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
-
withState
Copy the current immutable object by setting a value for thestateattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for state- Returns:
- A modified copy of the
thisobject
-
withDelta
Copy the current immutable object by setting a value for thedeltaattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for delta- Returns:
- A modified copy of the
thisobject
-
withRangeDifference
Copy the current immutable object by setting a value for therangeDifferenceattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for rangeDifference- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableTorsionAngleDeltathat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:angleType,state,delta,rangeDifference. -
toString
Prints the immutable valueTorsionAngleDeltawith attribute values. -
of
public static ImmutableTorsionAngleDelta of(MasterTorsionAngleType angleType, TorsionAngleDelta.State state, Angle delta, RangeDifference rangeDifference) Construct a new immutableTorsionAngleDeltainstance.- Parameters:
angleType- The value for theangleTypeattributestate- The value for thestateattributedelta- The value for thedeltaattributerangeDifference- The value for therangeDifferenceattribute- Returns:
- An immutable TorsionAngleDelta instance
-
copyOf
Creates an immutable copy of aTorsionAngleDeltavalue. 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 TorsionAngleDelta instance
-
builder
Creates a builder forImmutableTorsionAngleDelta.ImmutableTorsionAngleDelta.builder() .angleType(pl.poznan.put.torsion.MasterTorsionAngleType) // requiredangleType.state(pl.poznan.put.torsion.TorsionAngleDelta.State) // requiredstate.delta(pl.poznan.put.circular.Angle) // requireddelta.rangeDifference(pl.poznan.put.torsion.range.RangeDifference) // requiredrangeDifference.build();- Returns:
- A new ImmutableTorsionAngleDelta builder
-