Class POrthonormalized3D<T>

java.lang.Object
com.io7m.jtensors.orthonormalization.POrthonormalized3D<T>
Type Parameters:
T - A phantom type parameter
All Implemented Interfaces:
POrthonormalized3DType<T>

public final class POrthonormalized3D<T>
extends java.lang.Object
implements POrthonormalized3DType<T>
A set of vectors that are orthogonal to each other and are normalized.
  • Method Details

    • v0

      public PVector3D<T> v0()
      Specified by:
      v0 in interface POrthonormalized3DType<T>
      Returns:
      Vector 0
    • v1

      public PVector3D<T> v1()
      Specified by:
      v1 in interface POrthonormalized3DType<T>
      Returns:
      Vector 1
    • v2

      public PVector3D<T> v2()
      Specified by:
      v2 in interface POrthonormalized3DType<T>
      Returns:
      Vector 2
    • withV0

      public final POrthonormalized3D<T> withV0​(PVector3D<T> value)
      Copy the current immutable object by setting a value for the v0 attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for v0
      Returns:
      A modified copy of the this object
    • withV1

      public final POrthonormalized3D<T> withV1​(PVector3D<T> value)
      Copy the current immutable object by setting a value for the v1 attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for v1
      Returns:
      A modified copy of the this object
    • withV2

      public final POrthonormalized3D<T> withV2​(PVector3D<T> value)
      Copy the current immutable object by setting a value for the v2 attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      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 of POrthonormalized3D that have equal attribute values.
      Overrides:
      equals in class java.lang.Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: v0, v1, v2.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      hashCode value
    • toString

      public java.lang.String toString()
      Prints the immutable value POrthonormalized3D with attribute values.
      Overrides:
      toString in class java.lang.Object
      Returns:
      A string representation of the value
    • of

      public static <T> POrthonormalized3D<T> of​(PVector3D<T> v0, PVector3D<T> v1, PVector3D<T> v2)
      Construct a new immutable POrthonormalized3D instance.
      Type Parameters:
      T - generic parameter T
      Parameters:
      v0 - The value for the v0 attribute
      v1 - The value for the v1 attribute
      v2 - The value for the v2 attribute
      Returns:
      An immutable POrthonormalized3D instance
    • copyOf

      public static <T> POrthonormalized3D<T> copyOf​(POrthonormalized3DType<T> instance)
      Creates an immutable copy of a POrthonormalized3DType value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Type Parameters:
      T - generic parameter T
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable POrthonormalized3D instance
    • builder

      public static <T> POrthonormalized3D.Builder<T> builder()
      Creates a builder for POrthonormalized3D.
       POrthonormalized3D.&lt;T&gt;builder()
          .setV0(com.io7m.jtensors.core.parameterized.vectors.PVector3D&lt;T&gt;) // required v0
          .setV1(com.io7m.jtensors.core.parameterized.vectors.PVector3D&lt;T&gt;) // required v1
          .setV2(com.io7m.jtensors.core.parameterized.vectors.PVector3D&lt;T&gt;) // required v2
          .build();
       
      Type Parameters:
      T - generic parameter T
      Returns:
      A new POrthonormalized3D builder