com.io7m.jcanephora.renderstate

## Class JCGLDepthState.Builder

- java.lang.Object
- - com.io7m.jcanephora.renderstate.JCGLDepthState.Builder

- Enclosing class:
    JCGLDepthState

      public static final class JCGLDepthState.Builder
      extends Object

  Builds instances of type `JCGLDepthState`. 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 Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JCGLDepthState` | `build()` Builds a new `JCGLDepthState`.
    `JCGLDepthState.Builder` | `from(JCGLDepthStateType instance)` Fill a builder with attribute values from the provided `JCGLDepthStateType` instance.
    `JCGLDepthState.Builder` | `setDepthClamp(JCGLDepthClamping depthClamp)` Initializes the value for the `depthClamp` attribute.
    `JCGLDepthState.Builder` | `setDepthStrict(JCGLDepthStrict depthStrict)` Initializes the value for the `depthStrict` attribute.
    `JCGLDepthState.Builder` | `setDepthTest(JCGLDepthFunction depthTest)` Initializes the optional value `depthTest` to depthTest.
    `JCGLDepthState.Builder` | `setDepthTest(Optional<JCGLDepthFunction> depthTest)` Initializes the optional value `depthTest` to depthTest.
    `JCGLDepthState.Builder` | `setDepthWrite(JCGLDepthWriting depthWrite)` Initializes the value for the `depthWrite` attribute.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### from

          public final JCGLDepthState.Builder from(JCGLDepthStateType instance)

      Fill a builder with attribute values from the provided `JCGLDepthStateType` 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

    - #### setDepthStrict

          public final JCGLDepthState.Builder setDepthStrict(JCGLDepthStrict depthStrict)

      Initializes the value for the `depthStrict` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `depthStrict`.

      Parameters:
        `depthStrict` - The value for depthStrict
      Returns:
        `this` builder for use in a chained invocation

    - #### setDepthTest

          public final JCGLDepthState.Builder setDepthTest(JCGLDepthFunction depthTest)

      Initializes the optional value `depthTest` to depthTest.
      Parameters:
        `depthTest` - The value for depthTest
      Returns:
        `this` builder for chained invocation

    - #### setDepthTest

          public final JCGLDepthState.Builder setDepthTest(Optional<JCGLDepthFunction> depthTest)

      Initializes the optional value `depthTest` to depthTest.
      Parameters:
        `depthTest` - The value for depthTest
      Returns:
        `this` builder for use in a chained invocation

    - #### setDepthWrite

          public final JCGLDepthState.Builder setDepthWrite(JCGLDepthWriting depthWrite)

      Initializes the value for the `depthWrite` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `depthWrite`.

      Parameters:
        `depthWrite` - The value for depthWrite
      Returns:
        `this` builder for use in a chained invocation

    - #### setDepthClamp

          public final JCGLDepthState.Builder setDepthClamp(JCGLDepthClamping depthClamp)

      Initializes the value for the `depthClamp` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `depthClamp`.

      Parameters:
        `depthClamp` - The value for depthClamp
      Returns:
        `this` builder for use in a chained invocation

    - #### build

          public JCGLDepthState build()

      Builds a new `JCGLDepthState`.
      Returns:
        An immutable instance of JCGLDepthState
      Throws:
        `IllegalStateException` - if any required attributes are missing

Copyright © 2016 <code@io7m.com> http://io7m.com