Class VolumeBI
java.lang.Object
com.io7m.jregions.core.unparameterized.volumes.VolumeBI
- All Implemented Interfaces:
VolumeSizeValuesBIType,VolumeBIType,VolumeValuesBIType
public final class VolumeBI extends java.lang.Object implements VolumeBIType
A volume with BigInteger 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 classVolumeBI.BuilderBuilds instances of typeVolumeBI. -
Method Summary
Modifier and Type Method Description static VolumeBI.Builderbuilder()Creates a builder forVolumeBI.static VolumeBIcopyOf(VolumeBIType instance)Creates an immutable copy of aVolumeBITypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofVolumeBIthat have equal attribute values.inthashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY,minimumZ,maximumZ.java.math.BigIntegermaximumX()java.math.BigIntegermaximumY()java.math.BigIntegermaximumZ()java.math.BigIntegerminimumX()java.math.BigIntegerminimumY()java.math.BigIntegerminimumZ()static VolumeBIof(java.math.BigInteger minimumX, java.math.BigInteger maximumX, java.math.BigInteger minimumY, java.math.BigInteger maximumY, java.math.BigInteger minimumZ, java.math.BigInteger maximumZ)Construct a new immutableVolumeBIinstance.java.lang.StringtoString()Prints the immutable valueVolumeBIwith attribute values.VolumeBIwithMaximumX(java.math.BigInteger value)Copy the current immutable object by setting a value for themaximumXattribute.VolumeBIwithMaximumY(java.math.BigInteger value)Copy the current immutable object by setting a value for themaximumYattribute.VolumeBIwithMaximumZ(java.math.BigInteger value)Copy the current immutable object by setting a value for themaximumZattribute.VolumeBIwithMinimumX(java.math.BigInteger value)Copy the current immutable object by setting a value for theminimumXattribute.VolumeBIwithMinimumY(java.math.BigInteger value)Copy the current immutable object by setting a value for theminimumYattribute.VolumeBIwithMinimumZ(java.math.BigInteger 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.VolumeBIType
checkPreconditionsMethods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeValuesBIType
sizeX, sizeY, sizeZ
-
Method Details
-
minimumX
public java.math.BigInteger minimumX()- Specified by:
minimumXin interfaceVolumeBIType- Specified by:
minimumXin interfaceVolumeValuesBIType- Returns:
- The value of the
minimumXattribute
-
maximumX
public java.math.BigInteger maximumX()- Specified by:
maximumXin interfaceVolumeBIType- Specified by:
maximumXin interfaceVolumeValuesBIType- Returns:
- The value of the
maximumXattribute
-
minimumY
public java.math.BigInteger minimumY()- Specified by:
minimumYin interfaceVolumeBIType- Specified by:
minimumYin interfaceVolumeValuesBIType- Returns:
- The value of the
minimumYattribute
-
maximumY
public java.math.BigInteger maximumY()- Specified by:
maximumYin interfaceVolumeBIType- Specified by:
maximumYin interfaceVolumeValuesBIType- Returns:
- The value of the
maximumYattribute
-
minimumZ
public java.math.BigInteger minimumZ()- Specified by:
minimumZin interfaceVolumeBIType- Specified by:
minimumZin interfaceVolumeValuesBIType- Returns:
- The value of the
minimumZattribute
-
maximumZ
public java.math.BigInteger maximumZ()- Specified by:
maximumZin interfaceVolumeBIType- Specified by:
maximumZin interfaceVolumeValuesBIType- 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 ofVolumeBIthat 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 valueVolumeBIwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static VolumeBI of(java.math.BigInteger minimumX, java.math.BigInteger maximumX, java.math.BigInteger minimumY, java.math.BigInteger maximumY, java.math.BigInteger minimumZ, java.math.BigInteger maximumZ)Construct a new immutableVolumeBIinstance.- 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 VolumeBI instance
-
copyOf
Creates an immutable copy of aVolumeBITypevalue. 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 VolumeBI instance
-
builder
Creates a builder forVolumeBI.VolumeBI.builder() .setMinimumX(java.math.BigInteger) // requiredminimumX.setMaximumX(java.math.BigInteger) // requiredmaximumX.setMinimumY(java.math.BigInteger) // requiredminimumY.setMaximumY(java.math.BigInteger) // requiredmaximumY.setMinimumZ(java.math.BigInteger) // requiredminimumZ.setMaximumZ(java.math.BigInteger) // requiredmaximumZ.build();- Returns:
- A new VolumeBI builder
-