Class VolumeSizeL
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.VolumeSizeL
- All Implemented Interfaces:
VolumeSizeLType,VolumeSizeValuesLType
public final class VolumeSizeL extends java.lang.Object implements VolumeSizeLType
The size of a volume with
long coordinates.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVolumeSizeL.BuilderBuilds instances of typeVolumeSizeL. -
Method Summary
Modifier and Type Method Description static VolumeSizeL.Builderbuilder()Creates a builder forVolumeSizeL.static VolumeSizeLcopyOf(VolumeSizeLType instance)Creates an immutable copy of aVolumeSizeLTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofVolumeSizeLthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY,sizeZ.static VolumeSizeLof(long sizeX, long sizeY, long sizeZ)Construct a new immutableVolumeSizeLinstance.longsizeX()longsizeY()longsizeZ()java.lang.StringtoString()Prints the immutable valueVolumeSizeLwith attribute values.VolumeSizeLwithSizeX(long value)Copy the current immutable object by setting a value for thesizeXattribute.VolumeSizeLwithSizeY(long value)Copy the current immutable object by setting a value for thesizeYattribute.VolumeSizeLwithSizeZ(long value)Copy the current immutable object by setting a value for thesizeZattribute.
-
Method Details
-
sizeX
public long sizeX()- Specified by:
sizeXin interfaceVolumeSizeLType- Specified by:
sizeXin interfaceVolumeSizeValuesLType- Returns:
- The value of the
sizeXattribute
-
sizeY
public long sizeY()- Specified by:
sizeYin interfaceVolumeSizeLType- Specified by:
sizeYin interfaceVolumeSizeValuesLType- Returns:
- The value of the
sizeYattribute
-
sizeZ
public long sizeZ()- Specified by:
sizeZin interfaceVolumeSizeLType- Specified by:
sizeZin interfaceVolumeSizeValuesLType- Returns:
- The value of the
sizeZattribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeXattribute. 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
thisobject
-
withSizeY
Copy the current immutable object by setting a value for thesizeYattribute. 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
thisobject
-
withSizeZ
Copy the current immutable object by setting a value for thesizeZattribute. 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
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofVolumeSizeLthat 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 valueVolumeSizeLwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutableVolumeSizeLinstance.- Parameters:
sizeX- The value for thesizeXattributesizeY- The value for thesizeYattributesizeZ- The value for thesizeZattribute- Returns:
- An immutable VolumeSizeL instance
-
copyOf
Creates an immutable copy of aVolumeSizeLTypevalue. 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) // requiredsizeX.setSizeY(long) // requiredsizeY.setSizeZ(long) // requiredsizeZ.build();- Returns:
- A new VolumeSizeL builder
-