Class PVolumeF<S>
java.lang.Object
com.io7m.jregions.core.parameterized.volumes.PVolumeF<S>
- Type Parameters:
S- A phantom type parameter indicating the coordinate space of the volume
- All Implemented Interfaces:
PVolumeFType<S>,VolumeSizeValuesFType,VolumeValuesFType
A volume with float 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> PVolumeF.Builder<S>builder()Creates a builder forPVolumeF.static <S> PVolumeF<S>copyOf(PVolumeFType<S> instance) Creates an immutable copy of aPVolumeFTypevalue.booleanThis instance is equal to all instances ofPVolumeFthat have equal attribute values.inthashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY,minimumZ,maximumZ.floatmaximumX()floatmaximumY()floatmaximumZ()floatminimumX()floatminimumY()floatminimumZ()static <S> PVolumeF<S>of(float minimumX, float maximumX, float minimumY, float maximumY, float minimumZ, float maximumZ) Construct a new immutablePVolumeFinstance.toString()Prints the immutable valuePVolumeFwith attribute values.withMaximumX(float value) Copy the current immutable object by setting a value for themaximumXattribute.withMaximumY(float value) Copy the current immutable object by setting a value for themaximumYattribute.withMaximumZ(float value) Copy the current immutable object by setting a value for themaximumZattribute.withMinimumX(float value) Copy the current immutable object by setting a value for theminimumXattribute.withMinimumY(float value) Copy the current immutable object by setting a value for theminimumYattribute.withMinimumZ(float 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.PVolumeFType
checkPreconditionsMethods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeValuesFType
sizeX, sizeY, sizeZ
-
Method Details
-
minimumX
public float minimumX()- Specified by:
minimumXin interfacePVolumeFType<S>- Specified by:
minimumXin interfaceVolumeValuesFType- Returns:
- The value of the
minimumXattribute
-
maximumX
public float maximumX()- Specified by:
maximumXin interfacePVolumeFType<S>- Specified by:
maximumXin interfaceVolumeValuesFType- Returns:
- The value of the
maximumXattribute
-
minimumY
public float minimumY()- Specified by:
minimumYin interfacePVolumeFType<S>- Specified by:
minimumYin interfaceVolumeValuesFType- Returns:
- The value of the
minimumYattribute
-
maximumY
public float maximumY()- Specified by:
maximumYin interfacePVolumeFType<S>- Specified by:
maximumYin interfaceVolumeValuesFType- Returns:
- The value of the
maximumYattribute
-
minimumZ
public float minimumZ()- Specified by:
minimumZin interfacePVolumeFType<S>- Specified by:
minimumZin interfaceVolumeValuesFType- Returns:
- The value of the
minimumZattribute
-
maximumZ
public float maximumZ()- Specified by:
maximumZin interfacePVolumeFType<S>- Specified by:
maximumZin interfaceVolumeValuesFType- 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 ofPVolumeFthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY,minimumZ,maximumZ. -
toString
Prints the immutable valuePVolumeFwith attribute values. -
of
public static <S> PVolumeF<S> of(float minimumX, float maximumX, float minimumY, float maximumY, float minimumZ, float maximumZ) Construct a new immutablePVolumeFinstance.- 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 PVolumeF instance
-
copyOf
Creates an immutable copy of aPVolumeFTypevalue. 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 PVolumeF instance
-
builder
Creates a builder forPVolumeF.PVolumeF.<S>builder() .setMinimumX(float) // requiredminimumX.setMaximumX(float) // requiredmaximumX.setMinimumY(float) // requiredminimumY.setMaximumY(float) // requiredmaximumY.setMinimumZ(float) // requiredminimumZ.setMaximumZ(float) // requiredmaximumZ.build();- Type Parameters:
S- generic parameter S- Returns:
- A new PVolumeF builder
-