Class AreaSizeBI
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.AreaSizeBI
- All Implemented Interfaces:
AreaSizeBIType,AreaSizeValuesBIType
The size of an area with
BigInteger coordinates.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic AreaSizeBI.Builderbuilder()Creates a builder forAreaSizeBI.static AreaSizeBIcopyOf(AreaSizeBIType instance) Creates an immutable copy of aAreaSizeBITypevalue.booleanThis instance is equal to all instances ofAreaSizeBIthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY.height()Deprecated.static AreaSizeBIof(BigInteger sizeX, BigInteger sizeY) Construct a new immutableAreaSizeBIinstance.sizeX()sizeY()toString()Prints the immutable valueAreaSizeBIwith attribute values.width()Deprecated.UsesizeX()final AreaSizeBIwithSizeX(BigInteger value) Copy the current immutable object by setting a value for thesizeXattribute.final AreaSizeBIwithSizeY(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.UsesizeX()- Specified by:
widthin interfaceAreaSizeValuesBIType- Returns:
- The width of the area
-
height
Deprecated.UsesizeY()- Specified by:
heightin interfaceAreaSizeValuesBIType- Returns:
- The height of the area
-
sizeX
- Specified by:
sizeXin interfaceAreaSizeBIType- Specified by:
sizeXin interfaceAreaSizeValuesBIType- Returns:
- The value of the
sizeXattribute
-
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
This instance is equal to all instances ofAreaSizeBIthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX,sizeY. -
toString
Prints the immutable valueAreaSizeBIwith attribute values. -
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
-
sizeY()