Class Orthonormalized3D
java.lang.Object
com.io7m.jtensors.orthonormalization.Orthonormalized3D
- All Implemented Interfaces:
Orthonormalized3DType
public final class Orthonormalized3D extends java.lang.Object implements Orthonormalized3DType
A set of vectors that are orthogonal to each other and are normalized.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOrthonormalized3D.BuilderBuilds instances of typeOrthonormalized3D. -
Method Summary
Modifier and Type Method Description static Orthonormalized3D.Builderbuilder()Creates a builder forOrthonormalized3D.static Orthonormalized3DcopyOf(Orthonormalized3DType instance)Creates an immutable copy of aOrthonormalized3DTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofOrthonormalized3Dthat have equal attribute values.inthashCode()Computes a hash code from attributes:v0,v1,v2.static Orthonormalized3Dof(Vector3D v0, Vector3D v1, Vector3D v2)Construct a new immutableOrthonormalized3Dinstance.java.lang.StringtoString()Prints the immutable valueOrthonormalized3Dwith attribute values.Vector3Dv0()Vector3Dv1()Vector3Dv2()Orthonormalized3DwithV0(Vector3D value)Copy the current immutable object by setting a value for thev0attribute.Orthonormalized3DwithV1(Vector3D value)Copy the current immutable object by setting a value for thev1attribute.Orthonormalized3DwithV2(Vector3D value)Copy the current immutable object by setting a value for thev2attribute.
-
Method Details
-
v0
- Specified by:
v0in interfaceOrthonormalized3DType- Returns:
- Vector 0
-
v1
- Specified by:
v1in interfaceOrthonormalized3DType- Returns:
- Vector 1
-
v2
- Specified by:
v2in interfaceOrthonormalized3DType- Returns:
- Vector 2
-
withV0
Copy the current immutable object by setting a value for thev0attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for v0- Returns:
- A modified copy of the
thisobject
-
withV1
Copy the current immutable object by setting a value for thev1attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for v1- Returns:
- A modified copy of the
thisobject
-
withV2
Copy the current immutable object by setting a value for thev2attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for v2- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofOrthonormalized3Dthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:v0,v1,v2.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueOrthonormalized3Dwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutableOrthonormalized3Dinstance.- Parameters:
v0- The value for thev0attributev1- The value for thev1attributev2- The value for thev2attribute- Returns:
- An immutable Orthonormalized3D instance
-
copyOf
Creates an immutable copy of aOrthonormalized3DTypevalue. 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 Orthonormalized3D instance
-
builder
Creates a builder forOrthonormalized3D.Orthonormalized3D.builder() .setV0(com.io7m.jtensors.core.unparameterized.vectors.Vector3D) // requiredv0.setV1(com.io7m.jtensors.core.unparameterized.vectors.Vector3D) // requiredv1.setV2(com.io7m.jtensors.core.unparameterized.vectors.Vector3D) // requiredv2.build();- Returns:
- A new Orthonormalized3D builder
-