Class AreaBI
java.lang.Object
com.io7m.jregions.core.unparameterized.areas.AreaBI
- All Implemented Interfaces:
AreaBIType,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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic AreaBI.Builderbuilder()Creates a builder forAreaBI.static AreaBIcopyOf(AreaBIType instance) Creates an immutable copy of aAreaBITypevalue.booleanThis instance is equal to all instances ofAreaBIthat have equal attribute values.inthashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY.height()Deprecated.maximumX()maximumY()minimumX()minimumY()static AreaBIof(BigInteger minimumX, BigInteger maximumX, BigInteger minimumY, BigInteger maximumY) Construct a new immutableAreaBIinstance.toString()Prints the immutable valueAreaBIwith attribute values.width()Deprecated.final AreaBIwithMaximumX(BigInteger value) Copy the current immutable object by setting a value for themaximumXattribute.final AreaBIwithMaximumY(BigInteger value) Copy the current immutable object by setting a value for themaximumYattribute.final AreaBIwithMinimumX(BigInteger value) Copy the current immutable object by setting a value for theminimumXattribute.final AreaBIwithMinimumY(BigInteger value) Copy the current immutable object by setting a value for theminimumYattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.jregions.core.unparameterized.areas.AreaBIType
checkPreconditionsMethods inherited from interface com.io7m.jregions.core.unparameterized.areas.AreaValuesBIType
sizeX, sizeY
-
Method Details
-
width
Deprecated.- Specified by:
widthin interfaceAreaSizeValuesBIType- Returns:
- The width of the area
-
height
Deprecated.- Specified by:
heightin interfaceAreaSizeValuesBIType- Returns:
- The height of the area
-
minimumX
- Specified by:
minimumXin interfaceAreaBIType- Specified by:
minimumXin interfaceAreaValuesBIType- Returns:
- The value of the
minimumXattribute
-
maximumX
- Specified by:
maximumXin interfaceAreaBIType- Specified by:
maximumXin interfaceAreaValuesBIType- Returns:
- The value of the
maximumXattribute
-
minimumY
- Specified by:
minimumYin interfaceAreaBIType- Specified by:
minimumYin interfaceAreaValuesBIType- Returns:
- The value of the
minimumYattribute
-
maximumY
- Specified by:
maximumYin interfaceAreaBIType- Specified by:
maximumYin interfaceAreaValuesBIType- Returns:
- The value of the
maximumYattribute
-
withMinimumX
Copy the current immutable object by setting a value for theminimumXattribute. 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
thisobject
-
withMaximumX
Copy the current immutable object by setting a value for themaximumXattribute. 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
thisobject
-
withMinimumY
Copy the current immutable object by setting a value for theminimumYattribute. 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
thisobject
-
withMaximumY
Copy the current immutable object by setting a value for themaximumYattribute. 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
thisobject
-
equals
This instance is equal to all instances ofAreaBIthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:minimumX,maximumX,minimumY,maximumY. -
toString
Prints the immutable valueAreaBIwith attribute values. -
of
public static AreaBI of(BigInteger minimumX, BigInteger maximumX, BigInteger minimumY, BigInteger maximumY) Construct a new immutableAreaBIinstance.- Parameters:
minimumX- The value for theminimumXattributemaximumX- The value for themaximumXattributeminimumY- The value for theminimumYattributemaximumY- The value for themaximumYattribute- Returns:
- An immutable AreaBI instance
-
copyOf
Creates an immutable copy of aAreaBITypevalue. 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 AreaBI instance
-
builder
Creates a builder forAreaBI.AreaBI.builder() .setMinimumX(java.math.BigInteger) // requiredminimumX.setMaximumX(java.math.BigInteger) // requiredmaximumX.setMinimumY(java.math.BigInteger) // requiredminimumY.setMaximumY(java.math.BigInteger) // requiredmaximumY.build();- Returns:
- A new AreaBI builder
-
AreaValuesBIType.sizeY()