Class VolumeL
java.lang.Object
com.io7m.jregions.core.unparameterized.volumes.VolumeL
- All Implemented Interfaces:
VolumeSizeValuesLType,VolumeLType,VolumeValuesLType
A volume with long 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 VolumeL.Builderbuilder()Creates a builder forVolumeL.static VolumeLcopyOf(VolumeLType instance) Creates an immutable copy of aVolumeLTypevalue.booleanThis instance is equal to all instances ofVolumeLthat have equal attribute values.inthashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY,minimumZ,maximumZ.longmaximumX()longmaximumY()longmaximumZ()longminimumX()longminimumY()longminimumZ()static VolumeLof(long minimumX, long maximumX, long minimumY, long maximumY, long minimumZ, long maximumZ) Construct a new immutableVolumeLinstance.toString()Prints the immutable valueVolumeLwith attribute values.final VolumeLwithMaximumX(long value) Copy the current immutable object by setting a value for themaximumXattribute.final VolumeLwithMaximumY(long value) Copy the current immutable object by setting a value for themaximumYattribute.final VolumeLwithMaximumZ(long value) Copy the current immutable object by setting a value for themaximumZattribute.final VolumeLwithMinimumX(long value) Copy the current immutable object by setting a value for theminimumXattribute.final VolumeLwithMinimumY(long value) Copy the current immutable object by setting a value for theminimumYattribute.final VolumeLwithMinimumZ(long 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.VolumeLType
checkPreconditionsMethods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeValuesLType
sizeX, sizeY, sizeZ
-
Method Details
-
minimumX
public long minimumX()- Specified by:
minimumXin interfaceVolumeLType- Specified by:
minimumXin interfaceVolumeValuesLType- Returns:
- The value of the
minimumXattribute
-
maximumX
public long maximumX()- Specified by:
maximumXin interfaceVolumeLType- Specified by:
maximumXin interfaceVolumeValuesLType- Returns:
- The value of the
maximumXattribute
-
minimumY
public long minimumY()- Specified by:
minimumYin interfaceVolumeLType- Specified by:
minimumYin interfaceVolumeValuesLType- Returns:
- The value of the
minimumYattribute
-
maximumY
public long maximumY()- Specified by:
maximumYin interfaceVolumeLType- Specified by:
maximumYin interfaceVolumeValuesLType- Returns:
- The value of the
maximumYattribute
-
minimumZ
public long minimumZ()- Specified by:
minimumZin interfaceVolumeLType- Specified by:
minimumZin interfaceVolumeValuesLType- Returns:
- The value of the
minimumZattribute
-
maximumZ
public long maximumZ()- Specified by:
maximumZin interfaceVolumeLType- Specified by:
maximumZin interfaceVolumeValuesLType- Returns:
- The value of the
maximumZattribute
-
withMinimumX
Copy the current immutable object by setting a value for theminimumXattribute. A value equality check is 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 equality check is 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 equality check is 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 equality check is 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 equality check is 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 equality check is 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 ofVolumeLthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY,minimumZ,maximumZ. -
toString
Prints the immutable valueVolumeLwith attribute values. -
of
public static VolumeL of(long minimumX, long maximumX, long minimumY, long maximumY, long minimumZ, long maximumZ) Construct a new immutableVolumeLinstance.- 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 VolumeL instance
-
copyOf
Creates an immutable copy of aVolumeLTypevalue. 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 VolumeL instance
-
builder
Creates a builder forVolumeL.VolumeL.builder() .setMinimumX(long) // requiredminimumX.setMaximumX(long) // requiredmaximumX.setMinimumY(long) // requiredminimumY.setMaximumY(long) // requiredmaximumY.setMinimumZ(long) // requiredminimumZ.setMaximumZ(long) // requiredmaximumZ.build();- Returns:
- A new VolumeL builder
-