Class PAreaSizeBI<S>
java.lang.Object
com.io7m.jregions.core.parameterized.sizes.PAreaSizeBI<S>
- Type Parameters:
S
- A phantom type parameter indicating the coordinate space of the area
- All Implemented Interfaces:
PAreaSizeBIType<S>
,AreaSizeValuesBIType
The size of an area with
BigInteger
coordinates.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S> PAreaSizeBI.Builder<S>
builder()
Creates a builder forPAreaSizeBI
.static <S> PAreaSizeBI<S>
copyOf
(PAreaSizeBIType<S> instance) Creates an immutable copy of aPAreaSizeBIType
value.boolean
This instance is equal to all instances ofPAreaSizeBI
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sizeX
,sizeY
.height()
Deprecated.static <S> PAreaSizeBI<S>
of
(BigInteger sizeX, BigInteger sizeY) Construct a new immutablePAreaSizeBI
instance.sizeX()
sizeY()
toString()
Prints the immutable valuePAreaSizeBI
with attribute values.width()
Deprecated.UsesizeX()
final PAreaSizeBI<S>
withSizeX
(BigInteger value) Copy the current immutable object by setting a value for thesizeX
attribute.final PAreaSizeBI<S>
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.parameterized.sizes.PAreaSizeBIType
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 interfaceAreaSizeValuesBIType
- Specified by:
sizeX
in interfacePAreaSizeBIType<S>
- Returns:
- The value of the
sizeX
attribute
-
sizeY
- Specified by:
sizeY
in interfaceAreaSizeValuesBIType
- Specified by:
sizeY
in interfacePAreaSizeBIType<S>
- 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 ofPAreaSizeBI
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX
,sizeY
. -
toString
Prints the immutable valuePAreaSizeBI
with attribute values. -
of
Construct a new immutablePAreaSizeBI
instance.- Type Parameters:
S
- generic parameter S- Parameters:
sizeX
- The value for thesizeX
attributesizeY
- The value for thesizeY
attribute- Returns:
- An immutable PAreaSizeBI instance
-
copyOf
Creates an immutable copy of aPAreaSizeBIType
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
S
- generic parameter S- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable PAreaSizeBI instance
-
builder
Creates a builder forPAreaSizeBI
.PAreaSizeBI.<S>builder() .setSizeX(java.math.BigInteger) // required
sizeX
.setSizeY(java.math.BigInteger) // requiredsizeY
.build();- Type Parameters:
S
- generic parameter S- Returns:
- A new PAreaSizeBI builder
-
sizeY()