public static final class OctTreeRaycastResultI.Builder<T> extends Object
OctTreeRaycastResultI.
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 |
|---|---|
OctTreeRaycastResultI<T> |
build()
Builds a new
OctTreeRaycastResultI. |
OctTreeRaycastResultI.Builder<T> |
from(OctTreeRaycastResultIType<T> instance)
Fill a builder with attribute values from the provided
OctTreeRaycastResultIType instance. |
OctTreeRaycastResultI.Builder<T> |
setDistance(double distance)
Initializes the value for the
distance attribute. |
OctTreeRaycastResultI.Builder<T> |
setItem(T item)
Initializes the value for the
item attribute. |
OctTreeRaycastResultI.Builder<T> |
setVolume(com.io7m.jregions.core.unparameterized.volumes.VolumeI volume)
Initializes the value for the
volume attribute. |
public final OctTreeRaycastResultI.Builder<T> from(OctTreeRaycastResultIType<T> instance)
OctTreeRaycastResultIType 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 OctTreeRaycastResultI.Builder<T> setDistance(double distance)
distance attribute.distance - The value for distancethis builder for use in a chained invocationpublic final OctTreeRaycastResultI.Builder<T> setVolume(com.io7m.jregions.core.unparameterized.volumes.VolumeI volume)
volume attribute.volume - The value for volumethis builder for use in a chained invocationpublic final OctTreeRaycastResultI.Builder<T> setItem(T item)
item attribute.item - The value for itemthis builder for use in a chained invocationpublic OctTreeRaycastResultI<T> build()
OctTreeRaycastResultI.IllegalStateException - if any required attributes are missingCopyright © 2017 <code@io7m.com> http://io7m.com