Class PVolumeD<S>
java.lang.Object
com.io7m.jregions.core.parameterized.volumes.PVolumeD<S>
- Type Parameters:
S
- A phantom type parameter indicating the coordinate space of the volume
- All Implemented Interfaces:
PVolumeDType<S>
,VolumeSizeValuesDType
,VolumeValuesDType
A volume with double
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 <S> PVolumeD.Builder<S>
builder()
Creates a builder forPVolumeD
.static <S> PVolumeD<S>
copyOf
(PVolumeDType<S> instance) Creates an immutable copy of aPVolumeDType
value.boolean
This instance is equal to all instances ofPVolumeD
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:minimumX
,maximumX
,minimumY
,maximumY
,minimumZ
,maximumZ
.double
maximumX()
double
maximumY()
double
maximumZ()
double
minimumX()
double
minimumY()
double
minimumZ()
static <S> PVolumeD<S>
of
(double minimumX, double maximumX, double minimumY, double maximumY, double minimumZ, double maximumZ) Construct a new immutablePVolumeD
instance.toString()
Prints the immutable valuePVolumeD
with attribute values.withMaximumX
(double value) Copy the current immutable object by setting a value for themaximumX
attribute.withMaximumY
(double value) Copy the current immutable object by setting a value for themaximumY
attribute.withMaximumZ
(double value) Copy the current immutable object by setting a value for themaximumZ
attribute.withMinimumX
(double value) Copy the current immutable object by setting a value for theminimumX
attribute.withMinimumY
(double value) Copy the current immutable object by setting a value for theminimumY
attribute.withMinimumZ
(double 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.parameterized.volumes.PVolumeDType
checkPreconditions
Methods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeValuesDType
sizeX, sizeY, sizeZ
-
Method Details
-
minimumX
public double minimumX()- Specified by:
minimumX
in interfacePVolumeDType<S>
- Specified by:
minimumX
in interfaceVolumeValuesDType
- Returns:
- The value of the
minimumX
attribute
-
maximumX
public double maximumX()- Specified by:
maximumX
in interfacePVolumeDType<S>
- Specified by:
maximumX
in interfaceVolumeValuesDType
- Returns:
- The value of the
maximumX
attribute
-
minimumY
public double minimumY()- Specified by:
minimumY
in interfacePVolumeDType<S>
- Specified by:
minimumY
in interfaceVolumeValuesDType
- Returns:
- The value of the
minimumY
attribute
-
maximumY
public double maximumY()- Specified by:
maximumY
in interfacePVolumeDType<S>
- Specified by:
maximumY
in interfaceVolumeValuesDType
- Returns:
- The value of the
maximumY
attribute
-
minimumZ
public double minimumZ()- Specified by:
minimumZ
in interfacePVolumeDType<S>
- Specified by:
minimumZ
in interfaceVolumeValuesDType
- Returns:
- The value of the
minimumZ
attribute
-
maximumZ
public double maximumZ()- Specified by:
maximumZ
in interfacePVolumeDType<S>
- Specified by:
maximumZ
in interfaceVolumeValuesDType
- 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 ofPVolumeD
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 valuePVolumeD
with attribute values. -
of
public static <S> PVolumeD<S> of(double minimumX, double maximumX, double minimumY, double maximumY, double minimumZ, double maximumZ) Construct a new immutablePVolumeD
instance.- Type Parameters:
S
- generic parameter S- 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 PVolumeD instance
-
copyOf
Creates an immutable copy of aPVolumeDType
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
S
- generic parameter S- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable PVolumeD instance
-
builder
Creates a builder forPVolumeD
.PVolumeD.<S>builder() .setMinimumX(double) // required
minimumX
.setMaximumX(double) // requiredmaximumX
.setMinimumY(double) // requiredminimumY
.setMaximumY(double) // requiredmaximumY
.setMinimumZ(double) // requiredminimumZ
.setMaximumZ(double) // requiredmaximumZ
.build();- Type Parameters:
S
- generic parameter S- Returns:
- A new PVolumeD builder
-