Package com.io7m.jspatial.api.octtrees
Class OctTreeConfigurationL.Builder
- java.lang.Object
-
- com.io7m.jspatial.api.octtrees.OctTreeConfigurationL.Builder
-
- Enclosing class:
- OctTreeConfigurationL
public static final class OctTreeConfigurationL.Builder extends java.lang.ObjectBuilds instances of typeOctTreeConfigurationL. 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 OctTreeConfigurationLbuild()Builds a newOctTreeConfigurationL.OctTreeConfigurationL.Builderfrom(OctTreeConfigurationLType instance)Fill a builder with attribute values from the providedOctTreeConfigurationLTypeinstance.OctTreeConfigurationL.BuildersetMinimumOctantDepth(long minimumOctantDepth)Initializes the value for theminimumOctantDepthattribute.OctTreeConfigurationL.BuildersetMinimumOctantHeight(long minimumOctantHeight)Initializes the value for theminimumOctantHeightattribute.OctTreeConfigurationL.BuildersetMinimumOctantWidth(long minimumOctantWidth)Initializes the value for theminimumOctantWidthattribute.OctTreeConfigurationL.BuildersetTrimOnRemove(boolean trimOnRemove)Initializes the value for thetrimOnRemoveattribute.OctTreeConfigurationL.BuildersetVolume(com.io7m.jregions.core.unparameterized.volumes.VolumeL volume)Initializes the value for thevolumeattribute.
-
-
-
Method Detail
-
from
public final OctTreeConfigurationL.Builder from(OctTreeConfigurationLType instance)
Fill a builder with attribute values from the providedOctTreeConfigurationLTypeinstance. 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
-
setVolume
public final OctTreeConfigurationL.Builder 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
-
setMinimumOctantWidth
public final OctTreeConfigurationL.Builder setMinimumOctantWidth(long minimumOctantWidth)
Initializes the value for theminimumOctantWidthattribute.If not set, this attribute will have a default value as returned by the initializer of
minimumOctantWidth.- Parameters:
minimumOctantWidth- The value for minimumOctantWidth- Returns:
thisbuilder for use in a chained invocation
-
setMinimumOctantHeight
public final OctTreeConfigurationL.Builder setMinimumOctantHeight(long minimumOctantHeight)
Initializes the value for theminimumOctantHeightattribute.If not set, this attribute will have a default value as returned by the initializer of
minimumOctantHeight.- Parameters:
minimumOctantHeight- The value for minimumOctantHeight- Returns:
thisbuilder for use in a chained invocation
-
setMinimumOctantDepth
public final OctTreeConfigurationL.Builder setMinimumOctantDepth(long minimumOctantDepth)
Initializes the value for theminimumOctantDepthattribute.If not set, this attribute will have a default value as returned by the initializer of
minimumOctantDepth.- Parameters:
minimumOctantDepth- The value for minimumOctantDepth- Returns:
thisbuilder for use in a chained invocation
-
setTrimOnRemove
public final OctTreeConfigurationL.Builder setTrimOnRemove(boolean trimOnRemove)
Initializes the value for thetrimOnRemoveattribute.If not set, this attribute will have a default value as returned by the initializer of
trimOnRemove.- Parameters:
trimOnRemove- The value for trimOnRemove- Returns:
thisbuilder for use in a chained invocation
-
build
public OctTreeConfigurationL build()
Builds a newOctTreeConfigurationL.- Returns:
- An immutable instance of OctTreeConfigurationL
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-