Class VolumeL
java.lang.Object
com.io7m.jregions.core.unparameterized.volumes.VolumeL
- All Implemented Interfaces:
VolumeSizeValuesLType
,VolumeLType
,VolumeValuesLType
A volume with long
coordinates.
The coordinates of the area are given in half-closed form. That is,
minimumX()
refers to the minimum inclusive value on the X
axis, and maximumX()
refers to the maximum exclusive value on
the X axis. Likewise for the Y and Z axes.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic VolumeL.Builder
builder()
Creates a builder forVolumeL
.static VolumeL
copyOf
(VolumeLType instance) Creates an immutable copy of aVolumeLType
value.boolean
This instance is equal to all instances ofVolumeL
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:minimumX
,maximumX
,minimumY
,maximumY
,minimumZ
,maximumZ
.long
maximumX()
long
maximumY()
long
maximumZ()
long
minimumX()
long
minimumY()
long
minimumZ()
static VolumeL
of
(long minimumX, long maximumX, long minimumY, long maximumY, long minimumZ, long maximumZ) Construct a new immutableVolumeL
instance.toString()
Prints the immutable valueVolumeL
with attribute values.final VolumeL
withMaximumX
(long value) Copy the current immutable object by setting a value for themaximumX
attribute.final VolumeL
withMaximumY
(long value) Copy the current immutable object by setting a value for themaximumY
attribute.final VolumeL
withMaximumZ
(long value) Copy the current immutable object by setting a value for themaximumZ
attribute.final VolumeL
withMinimumX
(long value) Copy the current immutable object by setting a value for theminimumX
attribute.final VolumeL
withMinimumY
(long value) Copy the current immutable object by setting a value for theminimumY
attribute.final VolumeL
withMinimumZ
(long value) Copy the current immutable object by setting a value for theminimumZ
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeLType
checkPreconditions
Methods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeValuesLType
sizeX, sizeY, sizeZ
-
Method Details
-
minimumX
public long minimumX()- Specified by:
minimumX
in interfaceVolumeLType
- Specified by:
minimumX
in interfaceVolumeValuesLType
- Returns:
- The value of the
minimumX
attribute
-
maximumX
public long maximumX()- Specified by:
maximumX
in interfaceVolumeLType
- Specified by:
maximumX
in interfaceVolumeValuesLType
- Returns:
- The value of the
maximumX
attribute
-
minimumY
public long minimumY()- Specified by:
minimumY
in interfaceVolumeLType
- Specified by:
minimumY
in interfaceVolumeValuesLType
- Returns:
- The value of the
minimumY
attribute
-
maximumY
public long maximumY()- Specified by:
maximumY
in interfaceVolumeLType
- Specified by:
maximumY
in interfaceVolumeValuesLType
- Returns:
- The value of the
maximumY
attribute
-
minimumZ
public long minimumZ()- Specified by:
minimumZ
in interfaceVolumeLType
- Specified by:
minimumZ
in interfaceVolumeValuesLType
- Returns:
- The value of the
minimumZ
attribute
-
maximumZ
public long maximumZ()- Specified by:
maximumZ
in interfaceVolumeLType
- Specified by:
maximumZ
in interfaceVolumeValuesLType
- Returns:
- The value of the
maximumZ
attribute
-
withMinimumX
Copy the current immutable object by setting a value for theminimumX
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for minimumX- Returns:
- A modified copy of the
this
object
-
withMaximumX
Copy the current immutable object by setting a value for themaximumX
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maximumX- Returns:
- A modified copy of the
this
object
-
withMinimumY
Copy the current immutable object by setting a value for theminimumY
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for minimumY- Returns:
- A modified copy of the
this
object
-
withMaximumY
Copy the current immutable object by setting a value for themaximumY
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maximumY- Returns:
- A modified copy of the
this
object
-
withMinimumZ
Copy the current immutable object by setting a value for theminimumZ
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for minimumZ- Returns:
- A modified copy of the
this
object
-
withMaximumZ
Copy the current immutable object by setting a value for themaximumZ
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maximumZ- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofVolumeL
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:minimumX
,maximumX
,minimumY
,maximumY
,minimumZ
,maximumZ
. -
toString
Prints the immutable valueVolumeL
with attribute values. -
of
public static VolumeL of(long minimumX, long maximumX, long minimumY, long maximumY, long minimumZ, long maximumZ) Construct a new immutableVolumeL
instance.- Parameters:
minimumX
- The value for theminimumX
attributemaximumX
- The value for themaximumX
attributeminimumY
- The value for theminimumY
attributemaximumY
- The value for themaximumY
attributeminimumZ
- The value for theminimumZ
attributemaximumZ
- The value for themaximumZ
attribute- Returns:
- An immutable VolumeL instance
-
copyOf
Creates an immutable copy of aVolumeLType
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 VolumeL instance
-
builder
Creates a builder forVolumeL
.VolumeL.builder() .setMinimumX(long) // required
minimumX
.setMaximumX(long) // requiredmaximumX
.setMinimumY(long) // requiredminimumY
.setMaximumY(long) // requiredmaximumY
.setMinimumZ(long) // requiredminimumZ
.setMaximumZ(long) // requiredmaximumZ
.build();- Returns:
- A new VolumeL builder
-