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 class
OctTreeConfigurationL.Builder
Builds instances of typeOctTreeConfigurationL
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OctTreeConfigurationL.Builder
builder()
Creates a builder forOctTreeConfigurationL
.static OctTreeConfigurationL
copyOf(OctTreeConfigurationLType instance)
Creates an immutable copy of aOctTreeConfigurationLType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofOctTreeConfigurationL
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:volume
,minimumOctantWidth
,minimumOctantHeight
,minimumOctantDepth
,trimOnRemove
.long
minimumOctantDepth()
long
minimumOctantHeight()
long
minimumOctantWidth()
static OctTreeConfigurationL
of(com.io7m.jregions.core.unparameterized.volumes.VolumeL volume, long minimumOctantWidth, long minimumOctantHeight, long minimumOctantDepth, boolean trimOnRemove)
Construct a new immutableOctTreeConfigurationL
instance.java.lang.String
toString()
Prints the immutable valueOctTreeConfigurationL
with attribute values.boolean
trimOnRemove()
com.io7m.jregions.core.unparameterized.volumes.VolumeL
volume()
OctTreeConfigurationL
withMinimumOctantDepth(long value)
Copy the current immutable object by setting a value for theminimumOctantDepth
attribute.OctTreeConfigurationL
withMinimumOctantHeight(long value)
Copy the current immutable object by setting a value for theminimumOctantHeight
attribute.OctTreeConfigurationL
withMinimumOctantWidth(long value)
Copy the current immutable object by setting a value for theminimumOctantWidth
attribute.OctTreeConfigurationL
withTrimOnRemove(boolean value)
Copy the current immutable object by setting a value for thetrimOnRemove
attribute.OctTreeConfigurationL
withVolume(com.io7m.jregions.core.unparameterized.volumes.VolumeL value)
Copy the current immutable object by setting a value for thevolume
attribute.
-
-
-
Method Detail
-
volume
public com.io7m.jregions.core.unparameterized.volumes.VolumeL volume()
- Specified by:
volume
in interfaceOctTreeConfigurationLType
- Returns:
- The maximum bounding volume of the tree
-
minimumOctantWidth
public long minimumOctantWidth()
- Specified by:
minimumOctantWidth
in interfaceOctTreeConfigurationLType
- Returns:
- The minimum width of octants (must be
>= 2
)
-
minimumOctantHeight
public long minimumOctantHeight()
- Specified by:
minimumOctantHeight
in interfaceOctTreeConfigurationLType
- Returns:
- The minimum height of octants (must be
>= 2
)
-
minimumOctantDepth
public long minimumOctantDepth()
- Specified by:
minimumOctantDepth
in interfaceOctTreeConfigurationLType
- Returns:
- The minimum depth of octants (must be
>= 2
)
-
trimOnRemove
public boolean trimOnRemove()
- Specified by:
trimOnRemove
in interfaceOctTreeConfigurationLType
- Returns:
true
iff 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 thevolume
attribute. 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
this
object
-
withMinimumOctantWidth
public final OctTreeConfigurationL withMinimumOctantWidth(long value)
Copy the current immutable object by setting a value for theminimumOctantWidth
attribute. 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
this
object
-
withMinimumOctantHeight
public final OctTreeConfigurationL withMinimumOctantHeight(long value)
Copy the current immutable object by setting a value for theminimumOctantHeight
attribute. 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
this
object
-
withMinimumOctantDepth
public final OctTreeConfigurationL withMinimumOctantDepth(long value)
Copy the current immutable object by setting a value for theminimumOctantDepth
attribute. 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
this
object
-
withTrimOnRemove
public final OctTreeConfigurationL withTrimOnRemove(boolean value)
Copy the current immutable object by setting a value for thetrimOnRemove
attribute. 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
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofOctTreeConfigurationL
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:volume
,minimumOctantWidth
,minimumOctantHeight
,minimumOctantDepth
,trimOnRemove
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueOctTreeConfigurationL
with attribute values.- Overrides:
toString
in 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 immutableOctTreeConfigurationL
instance.- Parameters:
volume
- The value for thevolume
attributeminimumOctantWidth
- The value for theminimumOctantWidth
attributeminimumOctantHeight
- The value for theminimumOctantHeight
attributeminimumOctantDepth
- The value for theminimumOctantDepth
attributetrimOnRemove
- The value for thetrimOnRemove
attribute- Returns:
- An immutable OctTreeConfigurationL instance
-
copyOf
public static OctTreeConfigurationL copyOf(OctTreeConfigurationLType instance)
Creates an immutable copy of aOctTreeConfigurationLType
value. 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
-
-