Class CAxisSystem.Builder

java.lang.Object
com.io7m.jcoords.core.conversion.CAxisSystem.Builder
Enclosing class:
CAxisSystem

public static final class CAxisSystem.Builder extends Object
Builds instances of type CAxisSystem. 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 CAxisSystem.Builder from(CAxisSystemType instance)
      Fill a builder with attribute values from the provided CAxisSystemType 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
    • setRight

      public final CAxisSystem.Builder setRight(CAxis right)
      Initializes the value for the right attribute.
      Parameters:
      right - The value for right
      Returns:
      this builder for use in a chained invocation
    • setUp

      public final CAxisSystem.Builder setUp(CAxis up)
      Initializes the value for the up attribute.
      Parameters:
      up - The value for up
      Returns:
      this builder for use in a chained invocation
    • setForward

      public final CAxisSystem.Builder setForward(CAxis forward)
      Initializes the value for the forward attribute.
      Parameters:
      forward - The value for forward
      Returns:
      this builder for use in a chained invocation
    • build

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