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 class
Builds 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 ImmutableTorsionAngleDelta
copyOf
(TorsionAngleDelta instance) Creates an immutable copy of aTorsionAngleDelta
value.delta()
boolean
This instance is equal to all instances ofImmutableTorsionAngleDelta
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:angleType
,state
,delta
,rangeDifference
.static ImmutableTorsionAngleDelta
of
(MasterTorsionAngleType angleType, TorsionAngleDelta.State state, Angle delta, RangeDifference rangeDifference) Construct a new immutableTorsionAngleDelta
instance.state()
toString()
Prints the immutable valueTorsionAngleDelta
with attribute values.Copy the current immutable object by setting a value for theangleType
attribute.Copy the current immutable object by setting a value for thedelta
attribute.Copy the current immutable object by setting a value for therangeDifference
attribute.withState
(TorsionAngleDelta.State value) Copy the current immutable object by setting a value for thestate
attribute.Methods inherited from class pl.poznan.put.torsion.TorsionAngleDelta
bothInvalidInstance, exportName, longDisplayName, shortDisplayName, subtractTorsionAngleValues, toString
-
Method Details
-
angleType
- Specified by:
angleType
in classTorsionAngleDelta
- Returns:
- The type of torsion angle.
-
state
- Specified by:
state
in classTorsionAngleDelta
- Returns:
- The state of comparison depending on whether the inputs were valid or not.
-
delta
- Specified by:
delta
in classTorsionAngleDelta
- Returns:
- The actual result of subtraction.
-
rangeDifference
- Specified by:
rangeDifference
in classTorsionAngleDelta
- Returns:
- The difference in terms of ranges the angles belong to.
-
withAngleType
Copy the current immutable object by setting a value for theangleType
attribute. 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
this
object
-
withState
Copy the current immutable object by setting a value for thestate
attribute. 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
this
object
-
withDelta
Copy the current immutable object by setting a value for thedelta
attribute. 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
this
object
-
withRangeDifference
Copy the current immutable object by setting a value for therangeDifference
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableTorsionAngleDelta
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:angleType
,state
,delta
,rangeDifference
. -
toString
Prints the immutable valueTorsionAngleDelta
with attribute values. -
of
public static ImmutableTorsionAngleDelta of(MasterTorsionAngleType angleType, TorsionAngleDelta.State state, Angle delta, RangeDifference rangeDifference) Construct a new immutableTorsionAngleDelta
instance.- Parameters:
angleType
- The value for theangleType
attributestate
- The value for thestate
attributedelta
- The value for thedelta
attributerangeDifference
- The value for therangeDifference
attribute- Returns:
- An immutable TorsionAngleDelta instance
-
copyOf
Creates an immutable copy of aTorsionAngleDelta
value. 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) // required
angleType
.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
-