public static final class R2MaterialDepthSingle.Builder<M> extends Object
R2MaterialDepthSingle
.
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 |
---|---|
R2MaterialDepthSingle<M> |
build()
Builds a new
R2MaterialDepthSingle . |
R2MaterialDepthSingle.Builder<M> |
from(R2MaterialDepthSingleType<M> instance)
Fill a builder with attribute values from the provided
R2MaterialDepthSingleType instance. |
R2MaterialDepthSingle.Builder<M> |
setMaterialID(long materialID)
Initializes the value for the
materialID attribute. |
R2MaterialDepthSingle.Builder<M> |
setShader(R2ShaderDepthSingleUsableType<M> shader)
Initializes the value for the
shader attribute. |
R2MaterialDepthSingle.Builder<M> |
setShaderParameters(M shaderParameters)
Initializes the value for the
shaderParameters attribute. |
public final R2MaterialDepthSingle.Builder<M> from(R2MaterialDepthSingleType<M> instance)
R2MaterialDepthSingleType
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 R2MaterialDepthSingle.Builder<M> setMaterialID(long materialID)
materialID
attribute.materialID
- The value for materialIDthis
builder for use in a chained invocationpublic final R2MaterialDepthSingle.Builder<M> setShader(R2ShaderDepthSingleUsableType<M> shader)
shader
attribute.shader
- The value for shaderthis
builder for use in a chained invocationpublic final R2MaterialDepthSingle.Builder<M> setShaderParameters(M shaderParameters)
shaderParameters
attribute.shaderParameters
- The value for shaderParametersthis
builder for use in a chained invocationpublic R2MaterialDepthSingle<M> build()
R2MaterialDepthSingle
.IllegalStateException
- if any required attributes are missingCopyright © 2017 <code@io7m.com> http://io7m.com