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
-
Method Summary
Modifier and TypeMethodDescriptionstatic AreaSizeBI.Builder
builder()
Creates a builder forAreaSizeBI
.static AreaSizeBI
copyOf
(AreaSizeBIType instance) Creates an immutable copy of aAreaSizeBIType
value.boolean
This instance is equal to all instances ofAreaSizeBI
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sizeX
,sizeY
.height()
Deprecated.static AreaSizeBI
of
(BigInteger sizeX, BigInteger sizeY) Construct a new immutableAreaSizeBI
instance.sizeX()
sizeY()
toString()
Prints the immutable valueAreaSizeBI
with attribute values.width()
Deprecated.UsesizeX()
final AreaSizeBI
withSizeX
(BigInteger value) Copy the current immutable object by setting a value for thesizeX
attribute.final AreaSizeBI
withSizeY
(BigInteger value) Copy the current immutable object by setting a value for thesizeY
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.io7m.jregions.core.unparameterized.sizes.AreaSizeBIType
checkPreconditions
-
Method Details
-
width
Deprecated.UsesizeX()
- Specified by:
width
in interfaceAreaSizeValuesBIType
- Returns:
- The width of the area
-
height
Deprecated.UsesizeY()
- Specified by:
height
in interfaceAreaSizeValuesBIType
- Returns:
- The height of the area
-
sizeX
- Specified by:
sizeX
in interfaceAreaSizeBIType
- Specified by:
sizeX
in interfaceAreaSizeValuesBIType
- Returns:
- The value of the
sizeX
attribute
-
sizeY
- Specified by:
sizeY
in interfaceAreaSizeBIType
- Specified by:
sizeY
in interfaceAreaSizeValuesBIType
- Returns:
- The value of the
sizeY
attribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeX
attribute. 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
this
object
-
withSizeY
Copy the current immutable object by setting a value for thesizeY
attribute. 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
this
object
-
equals
This instance is equal to all instances ofAreaSizeBI
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX
,sizeY
. -
toString
Prints the immutable valueAreaSizeBI
with attribute values. -
of
Construct a new immutableAreaSizeBI
instance.- Parameters:
sizeX
- The value for thesizeX
attributesizeY
- The value for thesizeY
attribute- Returns:
- An immutable AreaSizeBI instance
-
copyOf
Creates an immutable copy of aAreaSizeBIType
value. 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) // required
sizeX
.setSizeY(java.math.BigInteger) // requiredsizeY
.build();- Returns:
- A new AreaSizeBI builder
-
sizeY()