Class Orthonormalized4D
java.lang.Object
com.io7m.jtensors.orthonormalization.Orthonormalized4D
- All Implemented Interfaces:
Orthonormalized4DType
public final class Orthonormalized4D extends java.lang.Object implements Orthonormalized4DType
A set of vectors that are orthogonal to each other and are normalized.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Orthonormalized4D.Builder
Builds instances of typeOrthonormalized4D
. -
Method Summary
Modifier and Type Method Description static Orthonormalized4D.Builder
builder()
Creates a builder forOrthonormalized4D
.static Orthonormalized4D
copyOf(Orthonormalized4DType instance)
Creates an immutable copy of aOrthonormalized4DType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofOrthonormalized4D
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:v0
,v1
,v2
.static Orthonormalized4D
of(Vector4D v0, Vector4D v1, Vector4D v2)
Construct a new immutableOrthonormalized4D
instance.java.lang.String
toString()
Prints the immutable valueOrthonormalized4D
with attribute values.Vector4D
v0()
Vector4D
v1()
Vector4D
v2()
Orthonormalized4D
withV0(Vector4D value)
Copy the current immutable object by setting a value for thev0
attribute.Orthonormalized4D
withV1(Vector4D value)
Copy the current immutable object by setting a value for thev1
attribute.Orthonormalized4D
withV2(Vector4D value)
Copy the current immutable object by setting a value for thev2
attribute.
-
Method Details
-
v0
- Specified by:
v0
in interfaceOrthonormalized4DType
- Returns:
- Vector 0
-
v1
- Specified by:
v1
in interfaceOrthonormalized4DType
- Returns:
- Vector 1
-
v2
- Specified by:
v2
in interfaceOrthonormalized4DType
- Returns:
- Vector 2
-
withV0
Copy the current immutable object by setting a value for thev0
attribute. 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
this
object
-
withV1
Copy the current immutable object by setting a value for thev1
attribute. 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
this
object
-
withV2
Copy the current immutable object by setting a value for thev2
attribute. 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
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofOrthonormalized4D
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()Computes a hash code from attributes:v0
,v1
,v2
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueOrthonormalized4D
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
Construct a new immutableOrthonormalized4D
instance.- Parameters:
v0
- The value for thev0
attributev1
- The value for thev1
attributev2
- The value for thev2
attribute- Returns:
- An immutable Orthonormalized4D instance
-
copyOf
Creates an immutable copy of aOrthonormalized4DType
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 Orthonormalized4D instance
-
builder
Creates a builder forOrthonormalized4D
.Orthonormalized4D.builder() .setV0(com.io7m.jtensors.core.unparameterized.vectors.Vector4D) // required
v0
.setV1(com.io7m.jtensors.core.unparameterized.vectors.Vector4D) // requiredv1
.setV2(com.io7m.jtensors.core.unparameterized.vectors.Vector4D) // requiredv2
.build();- Returns:
- A new Orthonormalized4D builder
-