Package com.io7m.jcamera
Class JCameraRotationCoefficients
java.lang.Object
com.io7m.jcamera.JCameraRotationCoefficients
- All Implemented Interfaces:
JCameraRotationCoefficientsType
public final class JCameraRotationCoefficients
extends Object
implements JCameraRotationCoefficientsType
A pair of rotation coefficients.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeJCameraRotationCoefficients. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forJCameraRotationCoefficients.static JCameraRotationCoefficientscopyOf(JCameraRotationCoefficientsType instance) Creates an immutable copy of aJCameraRotationCoefficientsTypevalue.booleanThis instance is equal to all instances ofJCameraRotationCoefficientsthat have equal attribute values.inthashCode()Computes a hash code from attributes:horizontal,vertical.doublestatic JCameraRotationCoefficientsof(double horizontal, double vertical) Construct a new immutableJCameraRotationCoefficientsinstance.toString()Prints the immutable valueJCameraRotationCoefficientswith attribute values.doublevertical()withHorizontal(double value) Copy the current immutable object by setting a value for thehorizontalattribute.withVertical(double value) Copy the current immutable object by setting a value for theverticalattribute.
-
Method Details
-
horizontal
public double horizontal()- Specified by:
horizontalin interfaceJCameraRotationCoefficientsType- Returns:
- The horizontal coefficient
-
vertical
public double vertical()- Specified by:
verticalin interfaceJCameraRotationCoefficientsType- Returns:
- The vertical coefficient
-
withHorizontal
Copy the current immutable object by setting a value for thehorizontalattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for horizontal- Returns:
- A modified copy of the
thisobject
-
withVertical
Copy the current immutable object by setting a value for theverticalattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for vertical- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofJCameraRotationCoefficientsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:horizontal,vertical. -
toString
Prints the immutable valueJCameraRotationCoefficientswith attribute values. -
of
Construct a new immutableJCameraRotationCoefficientsinstance.- Parameters:
horizontal- The value for thehorizontalattributevertical- The value for theverticalattribute- Returns:
- An immutable JCameraRotationCoefficients instance
-
copyOf
Creates an immutable copy of aJCameraRotationCoefficientsTypevalue. 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 JCameraRotationCoefficients instance
-
builder
Creates a builder forJCameraRotationCoefficients.JCameraRotationCoefficients.builder() .setHorizontal(double) // optionalhorizontal.setVertical(double) // optionalvertical.build();- Returns:
- A new JCameraRotationCoefficients builder
-