Class AreaSizeBI
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.AreaSizeBI
- All Implemented Interfaces:
AreaSizeBIType,AreaSizeValuesBIType
public final class AreaSizeBI extends java.lang.Object implements AreaSizeBIType
The size of an area with
BigInteger coordinates.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAreaSizeBI.BuilderBuilds instances of typeAreaSizeBI. -
Method Summary
Modifier and Type Method Description static AreaSizeBI.Builderbuilder()Creates a builder forAreaSizeBI.static AreaSizeBIcopyOf(AreaSizeBIType instance)Creates an immutable copy of aAreaSizeBITypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofAreaSizeBIthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY.java.math.BigIntegerheight()Deprecated.UsesizeY()static AreaSizeBIof(java.math.BigInteger sizeX, java.math.BigInteger sizeY)Construct a new immutableAreaSizeBIinstance.java.math.BigIntegersizeX()java.math.BigIntegersizeY()java.lang.StringtoString()Prints the immutable valueAreaSizeBIwith attribute values.java.math.BigIntegerwidth()Deprecated.UsesizeX()AreaSizeBIwithSizeX(java.math.BigInteger value)Copy the current immutable object by setting a value for thesizeXattribute.AreaSizeBIwithSizeY(java.math.BigInteger value)Copy the current immutable object by setting a value for thesizeYattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.jregions.core.unparameterized.sizes.AreaSizeBIType
checkPreconditions
-
Method Details
-
width
@Deprecated public java.math.BigInteger width()Deprecated.UsesizeX()- Specified by:
widthin interfaceAreaSizeValuesBIType- Returns:
- The width of the area
-
height
@Deprecated public java.math.BigInteger height()Deprecated.UsesizeY()- Specified by:
heightin interfaceAreaSizeValuesBIType- Returns:
- The height of the area
-
sizeX
public java.math.BigInteger sizeX()- Specified by:
sizeXin interfaceAreaSizeBIType- Specified by:
sizeXin interfaceAreaSizeValuesBIType- Returns:
- The value of the
sizeXattribute
-
sizeY
public java.math.BigInteger sizeY()- Specified by:
sizeYin interfaceAreaSizeBIType- Specified by:
sizeYin interfaceAreaSizeValuesBIType- Returns:
- The value of the
sizeYattribute
-
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
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofAreaSizeBIthat 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.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueAreaSizeBIwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutableAreaSizeBIinstance.- Parameters:
sizeX- The value for thesizeXattributesizeY- The value for thesizeYattribute- Returns:
- An immutable AreaSizeBI instance
-
copyOf
Creates an immutable copy of aAreaSizeBITypevalue. 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 AreaSizeBI instance
-
builder
Creates a builder forAreaSizeBI.AreaSizeBI.builder() .setSizeX(java.math.BigInteger) // requiredsizeX.setSizeY(java.math.BigInteger) // requiredsizeY.build();- Returns:
- A new AreaSizeBI builder
-