Package com.io7m.jspatial.api.octtrees
Class OctTreeConfigurationL
- java.lang.Object
-
- com.io7m.jspatial.api.octtrees.OctTreeConfigurationL
-
- All Implemented Interfaces:
OctTreeConfigurationLType
public final class OctTreeConfigurationL extends java.lang.Object implements OctTreeConfigurationLType
The type of long integer octtree configurations.- Since:
- 3.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOctTreeConfigurationL.BuilderBuilds instances of typeOctTreeConfigurationL.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OctTreeConfigurationL.Builderbuilder()Creates a builder forOctTreeConfigurationL.static OctTreeConfigurationLcopyOf(OctTreeConfigurationLType instance)Creates an immutable copy of aOctTreeConfigurationLTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofOctTreeConfigurationLthat have equal attribute values.inthashCode()Computes a hash code from attributes:volume,minimumOctantWidth,minimumOctantHeight,minimumOctantDepth,trimOnRemove.longminimumOctantDepth()longminimumOctantHeight()longminimumOctantWidth()static OctTreeConfigurationLof(com.io7m.jregions.core.unparameterized.volumes.VolumeL volume, long minimumOctantWidth, long minimumOctantHeight, long minimumOctantDepth, boolean trimOnRemove)Construct a new immutableOctTreeConfigurationLinstance.java.lang.StringtoString()Prints the immutable valueOctTreeConfigurationLwith attribute values.booleantrimOnRemove()com.io7m.jregions.core.unparameterized.volumes.VolumeLvolume()OctTreeConfigurationLwithMinimumOctantDepth(long value)Copy the current immutable object by setting a value for theminimumOctantDepthattribute.OctTreeConfigurationLwithMinimumOctantHeight(long value)Copy the current immutable object by setting a value for theminimumOctantHeightattribute.OctTreeConfigurationLwithMinimumOctantWidth(long value)Copy the current immutable object by setting a value for theminimumOctantWidthattribute.OctTreeConfigurationLwithTrimOnRemove(boolean value)Copy the current immutable object by setting a value for thetrimOnRemoveattribute.OctTreeConfigurationLwithVolume(com.io7m.jregions.core.unparameterized.volumes.VolumeL value)Copy the current immutable object by setting a value for thevolumeattribute.
-
-
-
Method Detail
-
volume
public com.io7m.jregions.core.unparameterized.volumes.VolumeL volume()
- Specified by:
volumein interfaceOctTreeConfigurationLType- Returns:
- The maximum bounding volume of the tree
-
minimumOctantWidth
public long minimumOctantWidth()
- Specified by:
minimumOctantWidthin interfaceOctTreeConfigurationLType- Returns:
- The minimum width of octants (must be
>= 2)
-
minimumOctantHeight
public long minimumOctantHeight()
- Specified by:
minimumOctantHeightin interfaceOctTreeConfigurationLType- Returns:
- The minimum height of octants (must be
>= 2)
-
minimumOctantDepth
public long minimumOctantDepth()
- Specified by:
minimumOctantDepthin interfaceOctTreeConfigurationLType- Returns:
- The minimum depth of octants (must be
>= 2)
-
trimOnRemove
public boolean trimOnRemove()
- Specified by:
trimOnRemovein interfaceOctTreeConfigurationLType- Returns:
trueiff the implementation should attempt to trim empty leaf nodes when an item is removed
-
withVolume
public final OctTreeConfigurationL withVolume(com.io7m.jregions.core.unparameterized.volumes.VolumeL value)
Copy the current immutable object by setting a value for thevolumeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for volume- Returns:
- A modified copy of the
thisobject
-
withMinimumOctantWidth
public final OctTreeConfigurationL withMinimumOctantWidth(long value)
Copy the current immutable object by setting a value for theminimumOctantWidthattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for minimumOctantWidth- Returns:
- A modified copy of the
thisobject
-
withMinimumOctantHeight
public final OctTreeConfigurationL withMinimumOctantHeight(long value)
Copy the current immutable object by setting a value for theminimumOctantHeightattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for minimumOctantHeight- Returns:
- A modified copy of the
thisobject
-
withMinimumOctantDepth
public final OctTreeConfigurationL withMinimumOctantDepth(long value)
Copy the current immutable object by setting a value for theminimumOctantDepthattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for minimumOctantDepth- Returns:
- A modified copy of the
thisobject
-
withTrimOnRemove
public final OctTreeConfigurationL withTrimOnRemove(boolean value)
Copy the current immutable object by setting a value for thetrimOnRemoveattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for trimOnRemove- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofOctTreeConfigurationLthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:volume,minimumOctantWidth,minimumOctantHeight,minimumOctantDepth,trimOnRemove.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueOctTreeConfigurationLwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static OctTreeConfigurationL of(com.io7m.jregions.core.unparameterized.volumes.VolumeL volume, long minimumOctantWidth, long minimumOctantHeight, long minimumOctantDepth, boolean trimOnRemove)
Construct a new immutableOctTreeConfigurationLinstance.- Parameters:
volume- The value for thevolumeattributeminimumOctantWidth- The value for theminimumOctantWidthattributeminimumOctantHeight- The value for theminimumOctantHeightattributeminimumOctantDepth- The value for theminimumOctantDepthattributetrimOnRemove- The value for thetrimOnRemoveattribute- Returns:
- An immutable OctTreeConfigurationL instance
-
copyOf
public static OctTreeConfigurationL copyOf(OctTreeConfigurationLType instance)
Creates an immutable copy of aOctTreeConfigurationLTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable OctTreeConfigurationL instance
-
builder
public static OctTreeConfigurationL.Builder builder()
Creates a builder forOctTreeConfigurationL.- Returns:
- A new OctTreeConfigurationL builder
-
-