Class PVolumeBD<S>
java.lang.Object
com.io7m.jregions.core.parameterized.volumes.PVolumeBD<S>
- Type Parameters:
S- A phantom type parameter indicating the coordinate space of the volume
- All Implemented Interfaces:
PVolumeBDType<S>,VolumeSizeValuesBDType,VolumeValuesBDType
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic <S> PVolumeBD.Builder<S>builder()Creates a builder forPVolumeBD.static <S> PVolumeBD<S>copyOf(PVolumeBDType<S> instance) Creates an immutable copy of aPVolumeBDTypevalue.booleanThis instance is equal to all instances ofPVolumeBDthat have equal attribute values.inthashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY,minimumZ,maximumZ.maximumX()maximumY()maximumZ()minimumX()minimumY()minimumZ()static <S> PVolumeBD<S>of(BigDecimal minimumX, BigDecimal maximumX, BigDecimal minimumY, BigDecimal maximumY, BigDecimal minimumZ, BigDecimal maximumZ) Construct a new immutablePVolumeBDinstance.toString()Prints the immutable valuePVolumeBDwith attribute values.withMaximumX(BigDecimal value) Copy the current immutable object by setting a value for themaximumXattribute.withMaximumY(BigDecimal value) Copy the current immutable object by setting a value for themaximumYattribute.withMaximumZ(BigDecimal value) Copy the current immutable object by setting a value for themaximumZattribute.withMinimumX(BigDecimal value) Copy the current immutable object by setting a value for theminimumXattribute.withMinimumY(BigDecimal value) Copy the current immutable object by setting a value for theminimumYattribute.withMinimumZ(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.parameterized.volumes.PVolumeBDType
checkPreconditionsMethods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeValuesBDType
sizeX, sizeY, sizeZ
-
Method Details
-
minimumX
- Specified by:
minimumXin interfacePVolumeBDType<S>- Specified by:
minimumXin interfaceVolumeValuesBDType- Returns:
- The value of the
minimumXattribute
-
maximumX
- Specified by:
maximumXin interfacePVolumeBDType<S>- Specified by:
maximumXin interfaceVolumeValuesBDType- Returns:
- The value of the
maximumXattribute
-
minimumY
- Specified by:
minimumYin interfacePVolumeBDType<S>- Specified by:
minimumYin interfaceVolumeValuesBDType- Returns:
- The value of the
minimumYattribute
-
maximumY
- Specified by:
maximumYin interfacePVolumeBDType<S>- Specified by:
maximumYin interfaceVolumeValuesBDType- Returns:
- The value of the
maximumYattribute
-
minimumZ
- Specified by:
minimumZin interfacePVolumeBDType<S>- Specified by:
minimumZin interfaceVolumeValuesBDType- Returns:
- The value of the
minimumZattribute
-
maximumZ
- Specified by:
maximumZin interfacePVolumeBDType<S>- 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
This instance is equal to all instances ofPVolumeBDthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY,minimumZ,maximumZ. -
toString
Prints the immutable valuePVolumeBDwith attribute values. -
of
public static <S> PVolumeBD<S> of(BigDecimal minimumX, BigDecimal maximumX, BigDecimal minimumY, BigDecimal maximumY, BigDecimal minimumZ, BigDecimal maximumZ) Construct a new immutablePVolumeBDinstance.- Type Parameters:
S- generic parameter S- 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 PVolumeBD instance
-
copyOf
Creates an immutable copy of aPVolumeBDTypevalue. 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 PVolumeBD instance
-
builder
Creates a builder forPVolumeBD.PVolumeBD.<S>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();- Type Parameters:
S- generic parameter S- Returns:
- A new PVolumeBD builder
-