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