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