public class Location
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
x
The x-coordinate.
|
protected int |
y
The y-coordinate.
|
Constructor and Description |
---|
Location()
Create a new Location.
|
Location(int x,
int y)
Create a new Location.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Test if two locations are equal.
|
int |
getX()
Get the x of this Location.
|
int |
getY()
Get the y of this Location.
|
int |
hashCode()
The hashcode is the 16 bit shifted x position
plus the y position.
|
void |
setX(int x)
Set the x of this Location.
|
void |
setY(int y)
Set the y of this Location.
|
public Location()
public Location(int x, int y)
public int getX()
public void setX(int x)
x
- the value to be setpublic int getY()
public void setY(int y)
y
- the value to be setpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object