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 of TorsionAngleValue.

Use the builder to create immutable instances: ImmutableTorsionAngleValue.builder(). Use the static factory method to create immutable instances: ImmutableTorsionAngleValue.of().

  • Method Details

    • angleType

      public TorsionAngleType angleType()
      Specified by:
      angleType in class TorsionAngleValue
      Returns:
      The type of this torsion angle.
    • value

      public Angle value()
      Specified by:
      value in class TorsionAngleValue
      Returns:
      The value of this torsion angle.
    • withAngleType

      public final ImmutableTorsionAngleValue withAngleType(TorsionAngleType value)
      Copy the current immutable object by setting a value for the angleType attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for angleType
      Returns:
      A modified copy of the this object
    • withValue

      public final ImmutableTorsionAngleValue withValue(Angle value)
      Copy the current immutable object by setting a value for the value attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for value
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableTorsionAngleValue that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: angleType, value.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value TorsionAngleValue with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static ImmutableTorsionAngleValue of(TorsionAngleType angleType, Angle value)
      Construct a new immutable TorsionAngleValue instance.
      Parameters:
      angleType - The value for the angleType attribute
      value - The value for the value attribute
      Returns:
      An immutable TorsionAngleValue instance
    • copyOf

      public static ImmutableTorsionAngleValue copyOf(TorsionAngleValue instance)
      Creates an immutable copy of a TorsionAngleValue 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 TorsionAngleValue instance
    • builder

      public static ImmutableTorsionAngleValue.Builder builder()
      Creates a builder for ImmutableTorsionAngleValue.
       ImmutableTorsionAngleValue.builder()
          .angleType(pl.poznan.put.torsion.TorsionAngleType) // required angleType
          .value(pl.poznan.put.circular.Angle) // required value
          .build();
       
      Returns:
      A new ImmutableTorsionAngleValue builder