Class PAreaBI<S>
java.lang.Object
com.io7m.jregions.core.parameterized.areas.PAreaBI<S>
- Type Parameters:
S
- A phantom type parameter indicating the coordinate space of the area
- All Implemented Interfaces:
PAreaBIType<S>
,AreaValuesBIType
,AreaSizeValuesBIType
An area with BigInteger
coordinates.
The coordinates of the area are given in half-closed form. That is,
minimumX()
refers to the minimum inclusive value on the X
axis, and maximumX()
refers to the maximum exclusive value on
the X axis. Likewise for the Y axis.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S> PAreaBI.Builder<S>
builder()
Creates a builder forPAreaBI
.static <S> PAreaBI<S>
copyOf
(PAreaBIType<S> instance) Creates an immutable copy of aPAreaBIType
value.boolean
This instance is equal to all instances ofPAreaBI
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:minimumX
,maximumX
,minimumY
,maximumY
.height()
Deprecated.maximumX()
maximumY()
minimumX()
minimumY()
static <S> PAreaBI<S>
of
(BigInteger minimumX, BigInteger maximumX, BigInteger minimumY, BigInteger maximumY) Construct a new immutablePAreaBI
instance.toString()
Prints the immutable valuePAreaBI
with attribute values.width()
Deprecated.withMaximumX
(BigInteger value) Copy the current immutable object by setting a value for themaximumX
attribute.withMaximumY
(BigInteger value) Copy the current immutable object by setting a value for themaximumY
attribute.withMinimumX
(BigInteger value) Copy the current immutable object by setting a value for theminimumX
attribute.withMinimumY
(BigInteger value) Copy the current immutable object by setting a value for theminimumY
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.areas.AreaValuesBIType
sizeX, sizeY
Methods inherited from interface com.io7m.jregions.core.parameterized.areas.PAreaBIType
checkPreconditions
-
Method Details
-
width
Deprecated.- Specified by:
width
in interfaceAreaSizeValuesBIType
- Returns:
- The width of the area
-
height
Deprecated.- Specified by:
height
in interfaceAreaSizeValuesBIType
- Returns:
- The height of the area
-
minimumX
- Specified by:
minimumX
in interfaceAreaValuesBIType
- Specified by:
minimumX
in interfacePAreaBIType<S>
- Returns:
- The value of the
minimumX
attribute
-
maximumX
- Specified by:
maximumX
in interfaceAreaValuesBIType
- Specified by:
maximumX
in interfacePAreaBIType<S>
- Returns:
- The value of the
maximumX
attribute
-
minimumY
- Specified by:
minimumY
in interfaceAreaValuesBIType
- Specified by:
minimumY
in interfacePAreaBIType<S>
- Returns:
- The value of the
minimumY
attribute
-
maximumY
- Specified by:
maximumY
in interfaceAreaValuesBIType
- Specified by:
maximumY
in interfacePAreaBIType<S>
- Returns:
- The value of the
maximumY
attribute
-
withMinimumX
Copy the current immutable object by setting a value for theminimumX
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for minimumX- Returns:
- A modified copy of the
this
object
-
withMaximumX
Copy the current immutable object by setting a value for themaximumX
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maximumX- Returns:
- A modified copy of the
this
object
-
withMinimumY
Copy the current immutable object by setting a value for theminimumY
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for minimumY- Returns:
- A modified copy of the
this
object
-
withMaximumY
Copy the current immutable object by setting a value for themaximumY
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maximumY- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofPAreaBI
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:minimumX
,maximumX
,minimumY
,maximumY
. -
toString
Prints the immutable valuePAreaBI
with attribute values. -
of
public static <S> PAreaBI<S> of(BigInteger minimumX, BigInteger maximumX, BigInteger minimumY, BigInteger maximumY) Construct a new immutablePAreaBI
instance.- Type Parameters:
S
- generic parameter S- Parameters:
minimumX
- The value for theminimumX
attributemaximumX
- The value for themaximumX
attributeminimumY
- The value for theminimumY
attributemaximumY
- The value for themaximumY
attribute- Returns:
- An immutable PAreaBI instance
-
copyOf
Creates an immutable copy of aPAreaBIType
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 PAreaBI instance
-
builder
Creates a builder forPAreaBI
.PAreaBI.<S>builder() .setMinimumX(java.math.BigInteger) // required
minimumX
.setMaximumX(java.math.BigInteger) // requiredmaximumX
.setMinimumY(java.math.BigInteger) // requiredminimumY
.setMaximumY(java.math.BigInteger) // requiredmaximumY
.build();- Type Parameters:
S
- generic parameter S- Returns:
- A new PAreaBI builder
-
AreaValuesBIType.sizeY()