com.io7m.jcanephora.core

## Class JCGLBufferUpdate.Builder<T extends JCGLBufferWritableType>

- java.lang.Object
- - com.io7m.jcanephora.core.JCGLBufferUpdate.Builder<T>

- Enclosing class:
    JCGLBufferUpdate<T extends JCGLBufferWritableType>

      public static final class JCGLBufferUpdate.Builder<T extends JCGLBufferWritableType>
      extends Object

  Builds instances of type `JCGLBufferUpdate`. 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
    --- | ---
    `JCGLBufferUpdate<T>` | `build()` Builds a new `JCGLBufferUpdate`.
    `JCGLBufferUpdate.Builder<T>` | `from(JCGLBufferUpdateType<T> instance)` Fill a builder with attribute values from the provided `JCGLBufferUpdateType` instance.
    `JCGLBufferUpdate.Builder<T>` | `setBuffer(T buffer)` Initializes the value for the `buffer` attribute.
    `JCGLBufferUpdate.Builder<T>` | `setData(ByteBuffer data)` Initializes the value for the `data` attribute.
    `JCGLBufferUpdate.Builder<T>` | `setDataUpdateRange(com.io7m.junsigned.ranges.UnsignedRangeInclusiveL dataUpdateRange)` Initializes the value for the `dataUpdateRange` attribute.

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

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

- - ### Method Detail

    - #### from

          public final JCGLBufferUpdate.Builder<T> from(JCGLBufferUpdateType<T> instance)

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

    - #### setBuffer

          public final JCGLBufferUpdate.Builder<T> setBuffer(T buffer)

      Initializes the value for the `buffer` attribute.
      Parameters:
        `buffer` - The value for buffer
      Returns:
        `this` builder for use in a chained invocation

    - #### setData

          public final JCGLBufferUpdate.Builder<T> setData(ByteBuffer data)

      Initializes the value for the `data` attribute.
      Parameters:
        `data` - The value for data
      Returns:
        `this` builder for use in a chained invocation

    - #### setDataUpdateRange

          public final JCGLBufferUpdate.Builder<T> setDataUpdateRange(com.io7m.junsigned.ranges.UnsignedRangeInclusiveL dataUpdateRange)

      Initializes the value for the `dataUpdateRange` attribute.
      Parameters:
        `dataUpdateRange` - The value for dataUpdateRange
      Returns:
        `this` builder for use in a chained invocation

    - #### build

          public JCGLBufferUpdate<T> build()

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

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