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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic VolumeSizeD.Builderbuilder()Creates a builder forVolumeSizeD.static VolumeSizeDcopyOf(VolumeSizeDType instance) Creates an immutable copy of aVolumeSizeDTypevalue.booleanThis instance is equal to all instances ofVolumeSizeDthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY,sizeZ.static VolumeSizeDof(double sizeX, double sizeY, double sizeZ) Construct a new immutableVolumeSizeDinstance.doublesizeX()doublesizeY()doublesizeZ()toString()Prints the immutable valueVolumeSizeDwith attribute values.final VolumeSizeDwithSizeX(double value) Copy the current immutable object by setting a value for thesizeXattribute.final VolumeSizeDwithSizeY(double value) Copy the current immutable object by setting a value for thesizeYattribute.final VolumeSizeDwithSizeZ(double value) Copy the current immutable object by setting a value for thesizeZattribute.
-
Method Details
-
sizeX
public double sizeX()- Specified by:
sizeXin interfaceVolumeSizeDType- Specified by:
sizeXin interfaceVolumeSizeValuesDType- Returns:
- The value of the
sizeXattribute
-
sizeY
public double sizeY()- Specified by:
sizeYin interfaceVolumeSizeDType- Specified by:
sizeYin interfaceVolumeSizeValuesDType- Returns:
- The value of the
sizeYattribute
-
sizeZ
public double sizeZ()- Specified by:
sizeZin interfaceVolumeSizeDType- Specified by:
sizeZin interfaceVolumeSizeValuesDType- Returns:
- The value of the
sizeZattribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeXattribute. 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
thisobject
-
withSizeY
Copy the current immutable object by setting a value for thesizeYattribute. 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
thisobject
-
withSizeZ
Copy the current immutable object by setting a value for thesizeZattribute. 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
thisobject
-
equals
This instance is equal to all instances ofVolumeSizeDthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX,sizeY,sizeZ. -
toString
Prints the immutable valueVolumeSizeDwith attribute values. -
of
Construct a new immutableVolumeSizeDinstance.- Parameters:
sizeX- The value for thesizeXattributesizeY- The value for thesizeYattributesizeZ- The value for thesizeZattribute- Returns:
- An immutable VolumeSizeD instance
-
copyOf
Creates an immutable copy of aVolumeSizeDTypevalue. 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) // requiredsizeX.setSizeY(double) // requiredsizeY.setSizeZ(double) // requiredsizeZ.build();- Returns:
- A new VolumeSizeD builder
-