Class VolumeSizeF
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.VolumeSizeF
- All Implemented Interfaces:
VolumeSizeFType,VolumeSizeValuesFType
public final class VolumeSizeF extends java.lang.Object implements VolumeSizeFType
The size of a volume with
float coordinates.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVolumeSizeF.BuilderBuilds instances of typeVolumeSizeF. -
Method Summary
Modifier and Type Method Description static VolumeSizeF.Builderbuilder()Creates a builder forVolumeSizeF.static VolumeSizeFcopyOf(VolumeSizeFType instance)Creates an immutable copy of aVolumeSizeFTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofVolumeSizeFthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY,sizeZ.static VolumeSizeFof(float sizeX, float sizeY, float sizeZ)Construct a new immutableVolumeSizeFinstance.floatsizeX()floatsizeY()floatsizeZ()java.lang.StringtoString()Prints the immutable valueVolumeSizeFwith attribute values.VolumeSizeFwithSizeX(float value)Copy the current immutable object by setting a value for thesizeXattribute.VolumeSizeFwithSizeY(float value)Copy the current immutable object by setting a value for thesizeYattribute.VolumeSizeFwithSizeZ(float value)Copy the current immutable object by setting a value for thesizeZattribute.
-
Method Details
-
sizeX
public float sizeX()- Specified by:
sizeXin interfaceVolumeSizeFType- Specified by:
sizeXin interfaceVolumeSizeValuesFType- Returns:
- The value of the
sizeXattribute
-
sizeY
public float sizeY()- Specified by:
sizeYin interfaceVolumeSizeFType- Specified by:
sizeYin interfaceVolumeSizeValuesFType- Returns:
- The value of the
sizeYattribute
-
sizeZ
public float sizeZ()- Specified by:
sizeZin interfaceVolumeSizeFType- Specified by:
sizeZin interfaceVolumeSizeValuesFType- 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
public boolean equals(java.lang.Object another)This instance is equal to all instances ofVolumeSizeFthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:sizeX,sizeY,sizeZ.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueVolumeSizeFwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutableVolumeSizeFinstance.- Parameters:
sizeX- The value for thesizeXattributesizeY- The value for thesizeYattributesizeZ- The value for thesizeZattribute- Returns:
- An immutable VolumeSizeF instance
-
copyOf
Creates an immutable copy of aVolumeSizeFTypevalue. 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) // requiredsizeX.setSizeY(float) // requiredsizeY.setSizeZ(float) // requiredsizeZ.build();- Returns:
- A new VolumeSizeF builder
-