public class Position
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected int |
x
The x position.
|
protected int |
y
The y position.
|
Constructor and Description |
---|
Position()
Create a position.
|
Position(int x,
int y)
Create a position.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Test if two positions are equal.
|
int |
getX()
Get the x value.
|
int |
getY()
Get the y value.
|
int |
hashCode()
Calculate the hash code.
|
void |
setX(int x)
Set x.
|
void |
setY(int y)
Set y.
|
java.lang.String |
toString()
Get the string representation.
|
public Position()
public Position(int x, int y)
public int getX()
public int getY()
public void setX(int x)
x
- public void setY(int y)
y
- public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object