Class VolumeSizeBI
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.VolumeSizeBI
- All Implemented Interfaces:
VolumeSizeBIType
,VolumeSizeValuesBIType
The size of a volume with
BigInteger
coordinates.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic VolumeSizeBI.Builder
builder()
Creates a builder forVolumeSizeBI
.static VolumeSizeBI
copyOf
(VolumeSizeBIType instance) Creates an immutable copy of aVolumeSizeBIType
value.boolean
This instance is equal to all instances ofVolumeSizeBI
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sizeX
,sizeY
,sizeZ
.static VolumeSizeBI
of
(BigInteger sizeX, BigInteger sizeY, BigInteger sizeZ) Construct a new immutableVolumeSizeBI
instance.sizeX()
sizeY()
sizeZ()
toString()
Prints the immutable valueVolumeSizeBI
with attribute values.final VolumeSizeBI
withSizeX
(BigInteger value) Copy the current immutable object by setting a value for thesizeX
attribute.final VolumeSizeBI
withSizeY
(BigInteger value) Copy the current immutable object by setting a value for thesizeY
attribute.final VolumeSizeBI
withSizeZ
(BigInteger value) Copy the current immutable object by setting a value for thesizeZ
attribute.
-
Method Details
-
sizeX
- Specified by:
sizeX
in interfaceVolumeSizeBIType
- Specified by:
sizeX
in interfaceVolumeSizeValuesBIType
- Returns:
- The value of the
sizeX
attribute
-
sizeY
- Specified by:
sizeY
in interfaceVolumeSizeBIType
- Specified by:
sizeY
in interfaceVolumeSizeValuesBIType
- Returns:
- The value of the
sizeY
attribute
-
sizeZ
- Specified by:
sizeZ
in interfaceVolumeSizeBIType
- Specified by:
sizeZ
in interfaceVolumeSizeValuesBIType
- Returns:
- The value of the
sizeZ
attribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeX
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sizeX- Returns:
- A modified copy of the
this
object
-
withSizeY
Copy the current immutable object by setting a value for thesizeY
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sizeY- Returns:
- A modified copy of the
this
object
-
withSizeZ
Copy the current immutable object by setting a value for thesizeZ
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sizeZ- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofVolumeSizeBI
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX
,sizeY
,sizeZ
. -
toString
Prints the immutable valueVolumeSizeBI
with attribute values. -
of
Construct a new immutableVolumeSizeBI
instance.- Parameters:
sizeX
- The value for thesizeX
attributesizeY
- The value for thesizeY
attributesizeZ
- The value for thesizeZ
attribute- Returns:
- An immutable VolumeSizeBI instance
-
copyOf
Creates an immutable copy of aVolumeSizeBIType
value. 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 VolumeSizeBI instance
-
builder
Creates a builder forVolumeSizeBI
.VolumeSizeBI.builder() .setSizeX(java.math.BigInteger) // required
sizeX
.setSizeY(java.math.BigInteger) // requiredsizeY
.setSizeZ(java.math.BigInteger) // requiredsizeZ
.build();- Returns:
- A new VolumeSizeBI builder
-