Class JCameraRotationCoefficientsMutable

java.lang.Object
com.io7m.jcamera.JCameraRotationCoefficientsMutable
All Implemented Interfaces:
JCameraRotationCoefficientsType

public final class JCameraRotationCoefficientsMutable extends Object implements JCameraRotationCoefficientsType
A modifiable implementation of the JCameraRotationCoefficientsType type.

Use the create() static factory methods to create new instances. Use the toImmutable() method to convert to canonical immutable instances.

JCameraRotationCoefficientsMutable is not thread-safe

See Also:
  • Method Details

    • create

      public static JCameraRotationCoefficientsMutable create(double horizontal, double vertical)
      Construct a modifiable instance of JCameraRotationCoefficientsType.
      Parameters:
      horizontal - The value for the horizontal attribute
      vertical - The value for the vertical attribute
      Returns:
      A new modifiable instance
    • create

      public static JCameraRotationCoefficientsMutable create()
      Construct a modifiable instance of JCameraRotationCoefficientsType.
      Returns:
      A new modifiable instance
    • horizontal

      public final double horizontal()
      Specified by:
      horizontal in interface JCameraRotationCoefficientsType
      Returns:
      The horizontal coefficient
    • vertical

      public final double vertical()
      Specified by:
      vertical in interface JCameraRotationCoefficientsType
      Returns:
      The vertical coefficient
    • clear

      Clears the object by setting all attributes to their initial values.
      Returns:
      this for use in a chained invocation
    • from

      Fill this modifiable instance with attribute values from the provided JCameraRotationCoefficientsType instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values).
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this for use in a chained invocation
    • from

      Fill this modifiable instance with attribute values from the provided JCameraRotationCoefficientsType instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values).
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this for use in a chained invocation
    • setHorizontal

      public JCameraRotationCoefficientsMutable setHorizontal(double horizontal)
      Assigns a value to the horizontal attribute.

      If not set, this attribute will have a default value returned by the initializer of horizontal.

      Parameters:
      horizontal - The value for horizontal
      Returns:
      this for use in a chained invocation
    • setVertical

      public JCameraRotationCoefficientsMutable setVertical(double vertical)
      Assigns a value to the vertical attribute.

      If not set, this attribute will have a default value returned by the initializer of vertical.

      Parameters:
      vertical - The value for vertical
      Returns:
      this for use in a chained invocation
    • horizontalIsSet

      public final boolean horizontalIsSet()
      Returns true if the default attribute horizontal is set.
      Returns:
      true if set
    • verticalIsSet

      public final boolean verticalIsSet()
      Returns true if the default attribute vertical is set.
      Returns:
      true if set
    • unsetHorizontal

      public final JCameraRotationCoefficientsMutable unsetHorizontal()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • unsetVertical

      public final JCameraRotationCoefficientsMutable unsetVertical()
      Reset an attribute to its initial value.
      Returns:
      this for use in a chained invocation
    • isInitialized

      public final boolean isInitialized()
      Returns true if all required attributes are set, indicating that the object is initialized.
      Returns:
      true if set
    • toImmutable

      public final JCameraRotationCoefficients toImmutable()
      Returns:
      An immutable instance of JCameraRotationCoefficients
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of JCameraRotationCoefficientsMutable 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: horizontal, vertical.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Generates a string representation of this JCameraRotationCoefficientsType. If uninitialized, some attribute values may appear as question marks.
      Overrides:
      toString in class Object
      Returns:
      A string representation