Class VolumeBD
java.lang.Object
com.io7m.jregions.core.unparameterized.volumes.VolumeBD
- All Implemented Interfaces:
VolumeSizeValuesBDType,VolumeBDType,VolumeValuesBDType
public final class VolumeBD extends java.lang.Object implements VolumeBDType
A volume with BigDecimal 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 Modifier and Type Class Description static classVolumeBD.BuilderBuilds instances of typeVolumeBD. -
Method Summary
Modifier and Type Method Description static VolumeBD.Builderbuilder()Creates a builder forVolumeBD.static VolumeBDcopyOf(VolumeBDType instance)Creates an immutable copy of aVolumeBDTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofVolumeBDthat have equal attribute values.inthashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY,minimumZ,maximumZ.java.math.BigDecimalmaximumX()java.math.BigDecimalmaximumY()java.math.BigDecimalmaximumZ()java.math.BigDecimalminimumX()java.math.BigDecimalminimumY()java.math.BigDecimalminimumZ()static VolumeBDof(java.math.BigDecimal minimumX, java.math.BigDecimal maximumX, java.math.BigDecimal minimumY, java.math.BigDecimal maximumY, java.math.BigDecimal minimumZ, java.math.BigDecimal maximumZ)Construct a new immutableVolumeBDinstance.java.lang.StringtoString()Prints the immutable valueVolumeBDwith attribute values.VolumeBDwithMaximumX(java.math.BigDecimal value)Copy the current immutable object by setting a value for themaximumXattribute.VolumeBDwithMaximumY(java.math.BigDecimal value)Copy the current immutable object by setting a value for themaximumYattribute.VolumeBDwithMaximumZ(java.math.BigDecimal value)Copy the current immutable object by setting a value for themaximumZattribute.VolumeBDwithMinimumX(java.math.BigDecimal value)Copy the current immutable object by setting a value for theminimumXattribute.VolumeBDwithMinimumY(java.math.BigDecimal value)Copy the current immutable object by setting a value for theminimumYattribute.VolumeBDwithMinimumZ(java.math.BigDecimal 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.VolumeBDType
checkPreconditionsMethods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeValuesBDType
sizeX, sizeY, sizeZ
-
Method Details
-
minimumX
public java.math.BigDecimal minimumX()- Specified by:
minimumXin interfaceVolumeBDType- Specified by:
minimumXin interfaceVolumeValuesBDType- Returns:
- The value of the
minimumXattribute
-
maximumX
public java.math.BigDecimal maximumX()- Specified by:
maximumXin interfaceVolumeBDType- Specified by:
maximumXin interfaceVolumeValuesBDType- Returns:
- The value of the
maximumXattribute
-
minimumY
public java.math.BigDecimal minimumY()- Specified by:
minimumYin interfaceVolumeBDType- Specified by:
minimumYin interfaceVolumeValuesBDType- Returns:
- The value of the
minimumYattribute
-
maximumY
public java.math.BigDecimal maximumY()- Specified by:
maximumYin interfaceVolumeBDType- Specified by:
maximumYin interfaceVolumeValuesBDType- Returns:
- The value of the
maximumYattribute
-
minimumZ
public java.math.BigDecimal minimumZ()- Specified by:
minimumZin interfaceVolumeBDType- Specified by:
minimumZin interfaceVolumeValuesBDType- Returns:
- The value of the
minimumZattribute
-
maximumZ
public java.math.BigDecimal maximumZ()- Specified by:
maximumZin interfaceVolumeBDType- Specified by:
maximumZin interfaceVolumeValuesBDType- Returns:
- The value of the
maximumZattribute
-
withMinimumX
Copy the current immutable object by setting a value for theminimumXattribute. An equals check 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. An equals check 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. An equals check 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. An equals check 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. An equals check 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. An equals check 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
public boolean equals(java.lang.Object another)This instance is equal to all instances ofVolumeBDthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY,minimumZ,maximumZ.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueVolumeBDwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static VolumeBD of(java.math.BigDecimal minimumX, java.math.BigDecimal maximumX, java.math.BigDecimal minimumY, java.math.BigDecimal maximumY, java.math.BigDecimal minimumZ, java.math.BigDecimal maximumZ)Construct a new immutableVolumeBDinstance.- 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 VolumeBD instance
-
copyOf
Creates an immutable copy of aVolumeBDTypevalue. 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 VolumeBD instance
-
builder
Creates a builder forVolumeBD.VolumeBD.builder() .setMinimumX(java.math.BigDecimal) // requiredminimumX.setMaximumX(java.math.BigDecimal) // requiredmaximumX.setMinimumY(java.math.BigDecimal) // requiredminimumY.setMaximumY(java.math.BigDecimal) // requiredmaximumY.setMinimumZ(java.math.BigDecimal) // requiredminimumZ.setMaximumZ(java.math.BigDecimal) // requiredmaximumZ.build();- Returns:
- A new VolumeBD builder
-