public static final class R2InstanceSingle.Builder extends Object
R2InstanceSingle
.
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 |
---|---|
R2InstanceSingle |
build()
Builds a new
R2InstanceSingle . |
R2InstanceSingle.Builder |
from(R2InstanceSingleType instance)
Fill a builder with attribute values from the provided
com.io7m.r2.core.R2InstanceSingleType instance. |
R2InstanceSingle.Builder |
from(R2InstanceType instance)
Fill a builder with attribute values from the provided
com.io7m.r2.core.R2InstanceType instance. |
R2InstanceSingle.Builder |
setArrayObject(com.io7m.jcanephora.core.JCGLArrayObjectUsableType arrayObject)
Initializes the value for the
arrayObject attribute. |
R2InstanceSingle.Builder |
setInstanceID(long instanceID)
Initializes the value for the
instanceID attribute. |
R2InstanceSingle.Builder |
setTransform(R2TransformReadableType transform)
Initializes the value for the
transform attribute. |
R2InstanceSingle.Builder |
setUvMatrix(com.io7m.jtensors.core.parameterized.matrices.PMatrix3x3D<R2SpaceTextureType,R2SpaceTextureType> uvMatrix)
Initializes the value for the
uvMatrix attribute. |
public final R2InstanceSingle.Builder from(R2InstanceType instance)
com.io7m.r2.core.R2InstanceType
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final R2InstanceSingle.Builder from(R2InstanceSingleType instance)
com.io7m.r2.core.R2InstanceSingleType
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final R2InstanceSingle.Builder setInstanceID(long instanceID)
instanceID
attribute.instanceID
- The value for instanceIDthis
builder for use in a chained invocationpublic final R2InstanceSingle.Builder setArrayObject(com.io7m.jcanephora.core.JCGLArrayObjectUsableType arrayObject)
arrayObject
attribute.arrayObject
- The value for arrayObjectthis
builder for use in a chained invocationpublic final R2InstanceSingle.Builder setTransform(R2TransformReadableType transform)
transform
attribute.transform
- The value for transformthis
builder for use in a chained invocationpublic final R2InstanceSingle.Builder setUvMatrix(com.io7m.jtensors.core.parameterized.matrices.PMatrix3x3D<R2SpaceTextureType,R2SpaceTextureType> uvMatrix)
uvMatrix
attribute.uvMatrix
- The value for uvMatrixthis
builder for use in a chained invocationpublic R2InstanceSingle build()
R2InstanceSingle
.IllegalStateException
- if any required attributes are missingCopyright © 2017 <code@io7m.com> http://io7m.com