Coordinates, Position, Sizepublic class BaseCoordinate extends Object
| Modifier and Type | Field | Description |
|---|---|---|
int |
height |
Height value.
|
int |
left |
X position value.
|
int |
top |
Y position value.
|
int |
width |
Width value.
|
static BaseCoordinate |
ZERO |
Constant with 0 values coordinates.
|
| Modifier | Constructor | Description |
|---|---|---|
protected |
BaseCoordinate(int widthValue,
int heightValue,
int leftValue,
int topValue) |
Full constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
contains(BaseCoordinate toCheck) |
Check if a coordinate is contained in another one.
|
boolean |
equals(Object o) |
|
int |
hashCode() |
|
String |
toString() |
public static final BaseCoordinate ZERO
public final int width
public final int height
public final int left
public final int top
protected BaseCoordinate(int widthValue,
int heightValue,
int leftValue,
int topValue)
widthValue - Width coordinate, must be positive.heightValue - Height coordinate, must be positive.leftValue - Left coordinate.topValue - Top coordinate.public final boolean contains(BaseCoordinate toCheck)
toCheck - Point to check.true if the given coordinate is containedCopyright © 2014–2018. All rights reserved.