Class VolumeSizeBI
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.VolumeSizeBI
- All Implemented Interfaces:
VolumeSizeBIType,VolumeSizeValuesBIType
public final class VolumeSizeBI extends java.lang.Object implements VolumeSizeBIType
The size of a volume with
BigInteger coordinates.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVolumeSizeBI.BuilderBuilds instances of typeVolumeSizeBI. -
Method Summary
Modifier and Type Method Description static VolumeSizeBI.Builderbuilder()Creates a builder forVolumeSizeBI.static VolumeSizeBIcopyOf(VolumeSizeBIType instance)Creates an immutable copy of aVolumeSizeBITypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofVolumeSizeBIthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY,sizeZ.static VolumeSizeBIof(java.math.BigInteger sizeX, java.math.BigInteger sizeY, java.math.BigInteger sizeZ)Construct a new immutableVolumeSizeBIinstance.java.math.BigIntegersizeX()java.math.BigIntegersizeY()java.math.BigIntegersizeZ()java.lang.StringtoString()Prints the immutable valueVolumeSizeBIwith attribute values.VolumeSizeBIwithSizeX(java.math.BigInteger value)Copy the current immutable object by setting a value for thesizeXattribute.VolumeSizeBIwithSizeY(java.math.BigInteger value)Copy the current immutable object by setting a value for thesizeYattribute.VolumeSizeBIwithSizeZ(java.math.BigInteger value)Copy the current immutable object by setting a value for thesizeZattribute.
-
Method Details
-
sizeX
public java.math.BigInteger sizeX()- Specified by:
sizeXin interfaceVolumeSizeBIType- Specified by:
sizeXin interfaceVolumeSizeValuesBIType- Returns:
- The value of the
sizeXattribute
-
sizeY
public java.math.BigInteger sizeY()- Specified by:
sizeYin interfaceVolumeSizeBIType- Specified by:
sizeYin interfaceVolumeSizeValuesBIType- Returns:
- The value of the
sizeYattribute
-
sizeZ
public java.math.BigInteger sizeZ()- Specified by:
sizeZin interfaceVolumeSizeBIType- Specified by:
sizeZin interfaceVolumeSizeValuesBIType- Returns:
- The value of the
sizeZattribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeXattribute. An equals check 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. An equals check 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. An equals check 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 ofVolumeSizeBIthat 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 valueVolumeSizeBIwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static VolumeSizeBI of(java.math.BigInteger sizeX, java.math.BigInteger sizeY, java.math.BigInteger sizeZ)Construct a new immutableVolumeSizeBIinstance.- Parameters:
sizeX- The value for thesizeXattributesizeY- The value for thesizeYattributesizeZ- The value for thesizeZattribute- Returns:
- An immutable VolumeSizeBI instance
-
copyOf
Creates an immutable copy of aVolumeSizeBITypevalue. 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 VolumeSizeBI instance
-
builder
Creates a builder forVolumeSizeBI.VolumeSizeBI.builder() .setSizeX(java.math.BigInteger) // requiredsizeX.setSizeY(java.math.BigInteger) // requiredsizeY.setSizeZ(java.math.BigInteger) // requiredsizeZ.build();- Returns:
- A new VolumeSizeBI builder
-