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