public class Coords
extends java.lang.Object
| Constructor and Description |
|---|
Coords()
Creates a new instance of Coords with default coordinates (0,0).
|
Coords(int x,
int y)
Creates a new instance of Coords with specified x and y coordinate.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" Coords class..
|
int |
getX()
Return x coordinate
|
int |
getY()
Return y coordinate
|
java.lang.String |
toString()
Returns a string representation of the Coords object
[ x = ,y = ]
|
public Coords()
public Coords(int x,
int y)
x - value of xy - value of ypublic int getX()
public int getY()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - obj - the reference object with which to compare.public java.lang.String toString()
toString in class java.lang.Object