Package com.io7m.jspatial.api.octtrees
Class OctTreeRaycastResultL.Builder<T>
- java.lang.Object
-
- com.io7m.jspatial.api.octtrees.OctTreeRaycastResultL.Builder<T>
-
- Enclosing class:
- OctTreeRaycastResultL<T>
public static final class OctTreeRaycastResultL.Builder<T> extends java.lang.ObjectBuilds instances of typeOctTreeRaycastResultL. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OctTreeRaycastResultL<T>build()Builds a newOctTreeRaycastResultL.OctTreeRaycastResultL.Builder<T>from(OctTreeRaycastResultLType<T> instance)Fill a builder with attribute values from the providedOctTreeRaycastResultLTypeinstance.OctTreeRaycastResultL.Builder<T>setDistance(double distance)Initializes the value for thedistanceattribute.OctTreeRaycastResultL.Builder<T>setItem(T item)Initializes the value for theitemattribute.OctTreeRaycastResultL.Builder<T>setVolume(com.io7m.jregions.core.unparameterized.volumes.VolumeL volume)Initializes the value for thevolumeattribute.
-
-
-
Method Detail
-
from
public final OctTreeRaycastResultL.Builder<T> from(OctTreeRaycastResultLType<T> instance)
Fill a builder with attribute values from the providedOctTreeRaycastResultLTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setDistance
public final OctTreeRaycastResultL.Builder<T> setDistance(double distance)
Initializes the value for thedistanceattribute.- Parameters:
distance- The value for distance- Returns:
thisbuilder for use in a chained invocation
-
setVolume
public final OctTreeRaycastResultL.Builder<T> setVolume(com.io7m.jregions.core.unparameterized.volumes.VolumeL volume)
Initializes the value for thevolumeattribute.- Parameters:
volume- The value for volume- Returns:
thisbuilder for use in a chained invocation
-
setItem
public final OctTreeRaycastResultL.Builder<T> setItem(T item)
Initializes the value for theitemattribute.- Parameters:
item- The value for item- Returns:
thisbuilder for use in a chained invocation
-
build
public OctTreeRaycastResultL<T> build()
Builds a newOctTreeRaycastResultL.- Returns:
- An immutable instance of OctTreeRaycastResultL
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-