public class Coordinate
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private int |
x |
private int |
y |
Constructor and Description |
---|
Coordinate(int x,
int y)
Creates a coordinate object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Coordinate |
GetEast()
Returns the coordinate to the right of the current coordinate.
|
Coordinate |
GetNorth()
Gets the coordinate above the current coordinate.
|
Coordinate |
GetNorthEast()
Returns the coordinate above and to the right of the current coordinate.
|
Coordinate |
GetNorthWest()
Returns the coordinate above and to the left of the current coordinate.
|
Coordinate |
GetSouth()
Returns the coordinate below the current coordinate.
|
Coordinate |
GetSouthEast()
Returns the coordinate below and to the right of the current coordinate.
|
Coordinate |
GetSouthWest()
Returns the coordinate below and to the left of the current coordinate.
|
Coordinate |
GetWest()
Returns the coordinate to the left of the current coordinate.
|
int |
getX() |
int |
getY() |
int |
hashCode() |
boolean |
isLeftHandCoordinate()
Determines if the coordinate is left handed.
|
boolean |
isRightHandCoordinate()
Determines if the coordinate is right handed.
|
java.lang.String |
toString() |
private static final long serialVersionUID
private int x
private int y
public Coordinate(int x, int y)
x
- X Coordinatey
- Y Coordinatepublic Coordinate GetNorth()
public Coordinate GetNorthEast()
public Coordinate GetEast()
public Coordinate GetSouthEast()
public Coordinate GetSouth()
public Coordinate GetSouthWest()
public Coordinate GetWest()
public Coordinate GetNorthWest()
public int getX()
public int getY()
public boolean isLeftHandCoordinate()
public boolean isRightHandCoordinate()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object