Class ImmutableTorsionAngleDelta

    • Method Detail

      • withAngleType

        public final ImmutableTorsionAngleDelta withAngleType​(MasterTorsionAngleType 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
      • withState

        public final ImmutableTorsionAngleDelta withState​(TorsionAngleDelta.State value)
        Copy the current immutable object by setting a value for the state attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for state
        Returns:
        A modified copy of the this object
      • withDelta

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

        public final ImmutableTorsionAngleDelta withRangeDifference​(RangeDifference value)
        Copy the current immutable object by setting a value for the rangeDifference attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for rangeDifference
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableTorsionAngleDelta 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, state, delta, rangeDifference.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableTorsionAngleDelta of​(MasterTorsionAngleType angleType,
                                                    TorsionAngleDelta.State state,
                                                    Angle delta,
                                                    RangeDifference rangeDifference)
        Construct a new immutable TorsionAngleDelta instance.
        Parameters:
        angleType - The value for the angleType attribute
        state - The value for the state attribute
        delta - The value for the delta attribute
        rangeDifference - The value for the rangeDifference attribute
        Returns:
        An immutable TorsionAngleDelta instance
      • copyOf

        public static ImmutableTorsionAngleDelta copyOf​(TorsionAngleDelta instance)
        Creates an immutable copy of a TorsionAngleDelta 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

        public static ImmutableTorsionAngleDelta.Builder builder()
        Creates a builder for ImmutableTorsionAngleDelta.
         ImmutableTorsionAngleDelta.builder()
            .angleType(pl.poznan.put.torsion.MasterTorsionAngleType) // required angleType
            .state(pl.poznan.put.torsion.TorsionAngleDelta.State) // required state
            .delta(pl.poznan.put.circular.Angle) // required delta
            .rangeDifference(pl.poznan.put.torsion.range.RangeDifference) // required rangeDifference
            .build();
         
        Returns:
        A new ImmutableTorsionAngleDelta builder