public static final class JCGLBufferUpdate.Builder<T extends JCGLBufferWritableType> extends Object
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.
| 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. |
public final JCGLBufferUpdate.Builder<T> from(JCGLBufferUpdateType<T> instance)
JCGLBufferUpdateType instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final JCGLBufferUpdate.Builder<T> setBuffer(T buffer)
buffer attribute.buffer - The value for bufferthis builder for use in a chained invocationpublic final JCGLBufferUpdate.Builder<T> setData(ByteBuffer data)
data attribute.data - The value for datathis builder for use in a chained invocationpublic final JCGLBufferUpdate.Builder<T> setDataUpdateRange(com.io7m.junsigned.ranges.UnsignedRangeInclusiveL dataUpdateRange)
dataUpdateRange attribute.dataUpdateRange - The value for dataUpdateRangethis builder for use in a chained invocationpublic JCGLBufferUpdate<T> build()
JCGLBufferUpdate.IllegalStateException - if any required attributes are missingCopyright © 2017 <code@io7m.com> http://io7m.com