|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.Coordinate
public class Coordinate
An two-dimensional immutable integer (x, y) coordinate.
| Constructor Summary | |
|---|---|
Coordinate(int x,
int y)
Creates a new coordinate representing the position (x,y) in 2D space. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o)
Compares this coordinate to another. |
boolean |
equals(java.lang.Object o)
Returns true if this coordinate is equivalent to the provided object. |
int |
getX()
Returns the x position of this coordinate. |
int |
getY()
Returns the y position of this coordinate. |
int |
hashCode()
Returns a hash code value for this coordinate. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Coordinate(int x,
int y)
x - The coordinate x position.y - The coordinate y position.| Method Detail |
|---|
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - A Coordinate to compare this coordinate to.
Comparable.compareTo(Object)public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - The object to test this coordinate for equality with.
Object.equals(Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public int getX()
public int getY()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||