Class VolumeSizeBD
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.VolumeSizeBD
- All Implemented Interfaces:
VolumeSizeBDType
,VolumeSizeValuesBDType
The size of a volume with
BigDecimal
coordinates.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic VolumeSizeBD.Builder
builder()
Creates a builder forVolumeSizeBD
.static VolumeSizeBD
copyOf
(VolumeSizeBDType instance) Creates an immutable copy of aVolumeSizeBDType
value.boolean
This instance is equal to all instances ofVolumeSizeBD
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sizeX
,sizeY
,sizeZ
.static VolumeSizeBD
of
(BigDecimal sizeX, BigDecimal sizeY, BigDecimal sizeZ) Construct a new immutableVolumeSizeBD
instance.sizeX()
sizeY()
sizeZ()
toString()
Prints the immutable valueVolumeSizeBD
with attribute values.final VolumeSizeBD
withSizeX
(BigDecimal value) Copy the current immutable object by setting a value for thesizeX
attribute.final VolumeSizeBD
withSizeY
(BigDecimal value) Copy the current immutable object by setting a value for thesizeY
attribute.final VolumeSizeBD
withSizeZ
(BigDecimal value) Copy the current immutable object by setting a value for thesizeZ
attribute.
-
Method Details
-
sizeX
- Specified by:
sizeX
in interfaceVolumeSizeBDType
- Specified by:
sizeX
in interfaceVolumeSizeValuesBDType
- Returns:
- The value of the
sizeX
attribute
-
sizeY
- Specified by:
sizeY
in interfaceVolumeSizeBDType
- Specified by:
sizeY
in interfaceVolumeSizeValuesBDType
- Returns:
- The value of the
sizeY
attribute
-
sizeZ
- Specified by:
sizeZ
in interfaceVolumeSizeBDType
- Specified by:
sizeZ
in interfaceVolumeSizeValuesBDType
- 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 ofVolumeSizeBD
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX
,sizeY
,sizeZ
. -
toString
Prints the immutable valueVolumeSizeBD
with attribute values. -
of
Construct a new immutableVolumeSizeBD
instance.- Parameters:
sizeX
- The value for thesizeX
attributesizeY
- The value for thesizeY
attributesizeZ
- The value for thesizeZ
attribute- Returns:
- An immutable VolumeSizeBD instance
-
copyOf
Creates an immutable copy of aVolumeSizeBDType
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 VolumeSizeBD instance
-
builder
Creates a builder forVolumeSizeBD
.VolumeSizeBD.builder() .setSizeX(java.math.BigDecimal) // required
sizeX
.setSizeY(java.math.BigDecimal) // requiredsizeY
.setSizeZ(java.math.BigDecimal) // requiredsizeZ
.build();- Returns:
- A new VolumeSizeBD builder
-