Class VolumeD
java.lang.Object
com.io7m.jregions.core.unparameterized.volumes.VolumeD
- All Implemented Interfaces:
VolumeSizeValuesDType,VolumeDType,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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic VolumeD.Builderbuilder()Creates a builder forVolumeD.static VolumeDcopyOf(VolumeDType instance) Creates an immutable copy of aVolumeDTypevalue.booleanThis instance is equal to all instances ofVolumeDthat have equal attribute values.inthashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY,minimumZ,maximumZ.doublemaximumX()doublemaximumY()doublemaximumZ()doubleminimumX()doubleminimumY()doubleminimumZ()static VolumeDof(double minimumX, double maximumX, double minimumY, double maximumY, double minimumZ, double maximumZ) Construct a new immutableVolumeDinstance.toString()Prints the immutable valueVolumeDwith attribute values.final VolumeDwithMaximumX(double value) Copy the current immutable object by setting a value for themaximumXattribute.final VolumeDwithMaximumY(double value) Copy the current immutable object by setting a value for themaximumYattribute.final VolumeDwithMaximumZ(double value) Copy the current immutable object by setting a value for themaximumZattribute.final VolumeDwithMinimumX(double value) Copy the current immutable object by setting a value for theminimumXattribute.final VolumeDwithMinimumY(double value) Copy the current immutable object by setting a value for theminimumYattribute.final VolumeDwithMinimumZ(double value) Copy the current immutable object by setting a value for theminimumZattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeDType
checkPreconditionsMethods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeValuesDType
sizeX, sizeY, sizeZ
-
Method Details
-
minimumX
public double minimumX()- Specified by:
minimumXin interfaceVolumeDType- Specified by:
minimumXin interfaceVolumeValuesDType- Returns:
- The value of the
minimumXattribute
-
maximumX
public double maximumX()- Specified by:
maximumXin interfaceVolumeDType- Specified by:
maximumXin interfaceVolumeValuesDType- Returns:
- The value of the
maximumXattribute
-
minimumY
public double minimumY()- Specified by:
minimumYin interfaceVolumeDType- Specified by:
minimumYin interfaceVolumeValuesDType- Returns:
- The value of the
minimumYattribute
-
maximumY
public double maximumY()- Specified by:
maximumYin interfaceVolumeDType- Specified by:
maximumYin interfaceVolumeValuesDType- Returns:
- The value of the
maximumYattribute
-
minimumZ
public double minimumZ()- Specified by:
minimumZin interfaceVolumeDType- Specified by:
minimumZin interfaceVolumeValuesDType- Returns:
- The value of the
minimumZattribute
-
maximumZ
public double maximumZ()- Specified by:
maximumZin interfaceVolumeDType- Specified by:
maximumZin interfaceVolumeValuesDType- Returns:
- The value of the
maximumZattribute
-
withMinimumX
Copy the current immutable object by setting a value for theminimumXattribute. 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
thisobject
-
withMaximumX
Copy the current immutable object by setting a value for themaximumXattribute. 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
thisobject
-
withMinimumY
Copy the current immutable object by setting a value for theminimumYattribute. 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
thisobject
-
withMaximumY
Copy the current immutable object by setting a value for themaximumYattribute. 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
thisobject
-
withMinimumZ
Copy the current immutable object by setting a value for theminimumZattribute. 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
thisobject
-
withMaximumZ
Copy the current immutable object by setting a value for themaximumZattribute. 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
thisobject
-
equals
This instance is equal to all instances ofVolumeDthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY,minimumZ,maximumZ. -
toString
Prints the immutable valueVolumeDwith attribute values. -
of
public static VolumeD of(double minimumX, double maximumX, double minimumY, double maximumY, double minimumZ, double maximumZ) Construct a new immutableVolumeDinstance.- Parameters:
minimumX- The value for theminimumXattributemaximumX- The value for themaximumXattributeminimumY- The value for theminimumYattributemaximumY- The value for themaximumYattributeminimumZ- The value for theminimumZattributemaximumZ- The value for themaximumZattribute- Returns:
- An immutable VolumeD instance
-
copyOf
Creates an immutable copy of aVolumeDTypevalue. 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 VolumeD instance
-
builder
Creates a builder forVolumeD.VolumeD.builder() .setMinimumX(double) // requiredminimumX.setMaximumX(double) // requiredmaximumX.setMinimumY(double) // requiredminimumY.setMaximumY(double) // requiredmaximumY.setMinimumZ(double) // requiredminimumZ.setMaximumZ(double) // requiredmaximumZ.build();- Returns:
- A new VolumeD builder
-