public static final class R2DebugLineSegment.Builder extends Object
R2DebugLineSegment
.
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 |
---|---|
R2DebugLineSegment |
build()
Builds a new
R2DebugLineSegment . |
R2DebugLineSegment.Builder |
from(R2DebugLineSegmentType instance)
Fill a builder with attribute values from the provided
R2DebugLineSegmentType instance. |
R2DebugLineSegment.Builder |
setFrom(com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceWorldType> from)
Initializes the value for the
from attribute. |
R2DebugLineSegment.Builder |
setFromColor(com.io7m.jtensors.core.parameterized.vectors.PVector4D<R2SpaceRGBAType> fromColor)
Initializes the value for the
fromColor attribute. |
R2DebugLineSegment.Builder |
setTo(com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceWorldType> to)
Initializes the value for the
to attribute. |
R2DebugLineSegment.Builder |
setToColor(com.io7m.jtensors.core.parameterized.vectors.PVector4D<R2SpaceRGBAType> toColor)
Initializes the value for the
toColor attribute. |
public final R2DebugLineSegment.Builder from(R2DebugLineSegmentType instance)
R2DebugLineSegmentType
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 R2DebugLineSegment.Builder setFrom(com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceWorldType> from)
from
attribute.from
- The value for fromthis
builder for use in a chained invocationpublic final R2DebugLineSegment.Builder setFromColor(com.io7m.jtensors.core.parameterized.vectors.PVector4D<R2SpaceRGBAType> fromColor)
fromColor
attribute.fromColor
- The value for fromColorthis
builder for use in a chained invocationpublic final R2DebugLineSegment.Builder setTo(com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceWorldType> to)
to
attribute.to
- The value for tothis
builder for use in a chained invocationpublic final R2DebugLineSegment.Builder setToColor(com.io7m.jtensors.core.parameterized.vectors.PVector4D<R2SpaceRGBAType> toColor)
toColor
attribute.toColor
- The value for toColorthis
builder for use in a chained invocationpublic R2DebugLineSegment build()
R2DebugLineSegment
.IllegalStateException
- if any required attributes are missingCopyright © 2017 <code@io7m.com> http://io7m.com