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