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