Class VolumeF
java.lang.Object
com.io7m.jregions.core.unparameterized.volumes.VolumeF
- All Implemented Interfaces:
VolumeSizeValuesFType
,VolumeFType
,VolumeValuesFType
A volume with float
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 VolumeF.Builder
builder()
Creates a builder forVolumeF
.static VolumeF
copyOf
(VolumeFType instance) Creates an immutable copy of aVolumeFType
value.boolean
This instance is equal to all instances ofVolumeF
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:minimumX
,maximumX
,minimumY
,maximumY
,minimumZ
,maximumZ
.float
maximumX()
float
maximumY()
float
maximumZ()
float
minimumX()
float
minimumY()
float
minimumZ()
static VolumeF
of
(float minimumX, float maximumX, float minimumY, float maximumY, float minimumZ, float maximumZ) Construct a new immutableVolumeF
instance.toString()
Prints the immutable valueVolumeF
with attribute values.final VolumeF
withMaximumX
(float value) Copy the current immutable object by setting a value for themaximumX
attribute.final VolumeF
withMaximumY
(float value) Copy the current immutable object by setting a value for themaximumY
attribute.final VolumeF
withMaximumZ
(float value) Copy the current immutable object by setting a value for themaximumZ
attribute.final VolumeF
withMinimumX
(float value) Copy the current immutable object by setting a value for theminimumX
attribute.final VolumeF
withMinimumY
(float value) Copy the current immutable object by setting a value for theminimumY
attribute.final VolumeF
withMinimumZ
(float 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.VolumeFType
checkPreconditions
Methods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeValuesFType
sizeX, sizeY, sizeZ
-
Method Details
-
minimumX
public float minimumX()- Specified by:
minimumX
in interfaceVolumeFType
- Specified by:
minimumX
in interfaceVolumeValuesFType
- Returns:
- The value of the
minimumX
attribute
-
maximumX
public float maximumX()- Specified by:
maximumX
in interfaceVolumeFType
- Specified by:
maximumX
in interfaceVolumeValuesFType
- Returns:
- The value of the
maximumX
attribute
-
minimumY
public float minimumY()- Specified by:
minimumY
in interfaceVolumeFType
- Specified by:
minimumY
in interfaceVolumeValuesFType
- Returns:
- The value of the
minimumY
attribute
-
maximumY
public float maximumY()- Specified by:
maximumY
in interfaceVolumeFType
- Specified by:
maximumY
in interfaceVolumeValuesFType
- Returns:
- The value of the
maximumY
attribute
-
minimumZ
public float minimumZ()- Specified by:
minimumZ
in interfaceVolumeFType
- Specified by:
minimumZ
in interfaceVolumeValuesFType
- Returns:
- The value of the
minimumZ
attribute
-
maximumZ
public float maximumZ()- Specified by:
maximumZ
in interfaceVolumeFType
- Specified by:
maximumZ
in interfaceVolumeValuesFType
- Returns:
- The value of the
maximumZ
attribute
-
withMinimumX
Copy the current immutable object by setting a value for theminimumX
attribute. A value strict bits equality 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 strict bits equality 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 strict bits equality 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 strict bits equality 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 strict bits equality 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 strict bits equality 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 ofVolumeF
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 valueVolumeF
with attribute values. -
of
public static VolumeF of(float minimumX, float maximumX, float minimumY, float maximumY, float minimumZ, float maximumZ) Construct a new immutableVolumeF
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 VolumeF instance
-
copyOf
Creates an immutable copy of aVolumeFType
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 VolumeF instance
-
builder
Creates a builder forVolumeF
.VolumeF.builder() .setMinimumX(float) // required
minimumX
.setMaximumX(float) // requiredmaximumX
.setMinimumY(float) // requiredminimumY
.setMaximumY(float) // requiredmaximumY
.setMinimumZ(float) // requiredminimumZ
.setMaximumZ(float) // requiredmaximumZ
.build();- Returns:
- A new VolumeF builder
-