Class Orthonormalized4D.Builder

java.lang.Object
com.io7m.jtensors.orthonormalization.Orthonormalized4D.Builder
Enclosing class:
Orthonormalized4D

public static final class Orthonormalized4D.Builder
extends java.lang.Object
Builds instances of type Orthonormalized4D. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final Orthonormalized4D.Builder from​(Orthonormalized4DType instance)
      Fill a builder with attribute values from the provided Orthonormalized4DType instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setV0

      public final Orthonormalized4D.Builder setV0​(Vector4D v0)
      Initializes the value for the v0 attribute.
      Parameters:
      v0 - The value for v0
      Returns:
      this builder for use in a chained invocation
    • setV1

      public final Orthonormalized4D.Builder setV1​(Vector4D v1)
      Initializes the value for the v1 attribute.
      Parameters:
      v1 - The value for v1
      Returns:
      this builder for use in a chained invocation
    • setV2

      public final Orthonormalized4D.Builder setV2​(Vector4D v2)
      Initializes the value for the v2 attribute.
      Parameters:
      v2 - The value for v2
      Returns:
      this builder for use in a chained invocation
    • build

      public Orthonormalized4D build()
      Builds a new Orthonormalized4D.
      Returns:
      An immutable instance of Orthonormalized4D
      Throws:
      java.lang.IllegalStateException - if any required attributes are missing