Package com.io7m.jcamera
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 Summary
Modifier and TypeMethodDescriptionclear()Clears the object by setting all attributes to their initial values.create()Construct a modifiable instance ofJCameraRotationCoefficientsType.create(double horizontal, double vertical) Construct a modifiable instance ofJCameraRotationCoefficientsType.booleanThis instance is equal to all instances ofJCameraRotationCoefficientsMutablethat have equal attribute values.from(JCameraRotationCoefficientsMutable instance) Fill this modifiable instance with attribute values from the providedJCameraRotationCoefficientsTypeinstance.from(JCameraRotationCoefficientsType instance) Fill this modifiable instance with attribute values from the providedJCameraRotationCoefficientsTypeinstance.inthashCode()Computes a hash code from attributes:horizontal,vertical.final doublefinal booleanReturnstrueif the default attributehorizontalis set.final booleanReturnstrueif all required attributes are set, indicating that the object is initialized.setHorizontal(double horizontal) Assigns a value to thehorizontalattribute.setVertical(double vertical) Assigns a value to theverticalattribute.Converts toJCameraRotationCoefficients.toString()Generates a string representation of thisJCameraRotationCoefficientsType.Reset an attribute to its initial value.Reset an attribute to its initial value.final doublevertical()final booleanReturnstrueif the default attributeverticalis set.
-
Method Details
-
create
Construct a modifiable instance ofJCameraRotationCoefficientsType.- Parameters:
horizontal- The value for thehorizontalattributevertical- The value for theverticalattribute- Returns:
- A new modifiable instance
-
create
Construct a modifiable instance ofJCameraRotationCoefficientsType.- Returns:
- A new modifiable instance
-
horizontal
public final double horizontal()- Specified by:
horizontalin interfaceJCameraRotationCoefficientsType- Returns:
- The horizontal coefficient
-
vertical
public final double vertical()- Specified by:
verticalin interfaceJCameraRotationCoefficientsType- Returns:
- The vertical coefficient
-
clear
Clears the object by setting all attributes to their initial values.- Returns:
thisfor use in a chained invocation
-
from
Fill this modifiable instance with attribute values from the providedJCameraRotationCoefficientsTypeinstance. 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:
thisfor use in a chained invocation
-
from
Fill this modifiable instance with attribute values from the providedJCameraRotationCoefficientsTypeinstance. 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:
thisfor use in a chained invocation
-
setHorizontal
Assigns a value to thehorizontalattribute.If not set, this attribute will have a default value returned by the initializer of
horizontal.- Parameters:
horizontal- The value for horizontal- Returns:
thisfor use in a chained invocation
-
setVertical
Assigns a value to theverticalattribute.If not set, this attribute will have a default value returned by the initializer of
vertical.- Parameters:
vertical- The value for vertical- Returns:
thisfor use in a chained invocation
-
horizontalIsSet
public final boolean horizontalIsSet()Returnstrueif the default attributehorizontalis set.- Returns:
trueif set
-
verticalIsSet
public final boolean verticalIsSet()Returnstrueif the default attributeverticalis set.- Returns:
trueif set
-
unsetHorizontal
Reset an attribute to its initial value.- Returns:
thisfor use in a chained invocation
-
unsetVertical
Reset an attribute to its initial value.- Returns:
thisfor use in a chained invocation
-
isInitialized
public final boolean isInitialized()Returnstrueif all required attributes are set, indicating that the object is initialized.- Returns:
trueif set
-
toImmutable
Converts toJCameraRotationCoefficients.- Returns:
- An immutable instance of JCameraRotationCoefficients
-
equals
This instance is equal to all instances ofJCameraRotationCoefficientsMutablethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:horizontal,vertical. -
toString
Generates a string representation of thisJCameraRotationCoefficientsType. If uninitialized, some attribute values may appear as question marks.
-