Class PVolumeSizeD<S>
java.lang.Object
com.io7m.jregions.core.parameterized.sizes.PVolumeSizeD<S>
- Type Parameters:
S
- A phantom type parameter indicating the coordinate space of the volume
- All Implemented Interfaces:
PVolumeSizeDType<S>
,VolumeSizeValuesDType
The size of a volume with
double
coordinates.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S> PVolumeSizeD.Builder<S>
builder()
Creates a builder forPVolumeSizeD
.static <S> PVolumeSizeD<S>
copyOf
(PVolumeSizeDType<S> instance) Creates an immutable copy of aPVolumeSizeDType
value.boolean
This instance is equal to all instances ofPVolumeSizeD
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sizeX
,sizeY
,sizeZ
.static <S> PVolumeSizeD<S>
of
(double sizeX, double sizeY, double sizeZ) Construct a new immutablePVolumeSizeD
instance.double
sizeX()
double
sizeY()
double
sizeZ()
toString()
Prints the immutable valuePVolumeSizeD
with attribute values.final PVolumeSizeD<S>
withSizeX
(double value) Copy the current immutable object by setting a value for thesizeX
attribute.final PVolumeSizeD<S>
withSizeY
(double value) Copy the current immutable object by setting a value for thesizeY
attribute.final PVolumeSizeD<S>
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 interfacePVolumeSizeDType<S>
- Specified by:
sizeX
in interfaceVolumeSizeValuesDType
- Returns:
- The value of the
sizeX
attribute
-
sizeY
public double sizeY()- Specified by:
sizeY
in interfacePVolumeSizeDType<S>
- Specified by:
sizeY
in interfaceVolumeSizeValuesDType
- Returns:
- The value of the
sizeY
attribute
-
sizeZ
public double sizeZ()- Specified by:
sizeZ
in interfacePVolumeSizeDType<S>
- 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 ofPVolumeSizeD
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX
,sizeY
,sizeZ
. -
toString
Prints the immutable valuePVolumeSizeD
with attribute values. -
of
Construct a new immutablePVolumeSizeD
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 PVolumeSizeD instance
-
copyOf
Creates an immutable copy of aPVolumeSizeDType
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 PVolumeSizeD instance
-
builder
Creates a builder forPVolumeSizeD
.PVolumeSizeD.<S>builder() .setSizeX(double) // required
sizeX
.setSizeY(double) // requiredsizeY
.setSizeZ(double) // requiredsizeZ
.build();- Type Parameters:
S
- generic parameter S- Returns:
- A new PVolumeSizeD builder
-