|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.common.model.Map.Position
public static final class Map.Position
Represents a position on the Map.
Field Summary | |
---|---|
int |
x
|
int |
y
|
Constructor Summary | |
---|---|
Map.Position(int posX,
int posY)
Creates a new object with the given position. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object other)
Compares the other Position based on the coordinates. |
int |
getX()
Returns the x-coordinate of this Position. |
int |
getY()
Returns the y-coordinate of this Position. |
int |
hashCode()
Returns a hash code value. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final int x
public final int y
Constructor Detail |
---|
public Map.Position(int posX, int posY)
posX
- The x-coordinate for this position.posY
- The y-coordinate for this position.Method Detail |
---|
public int getX()
public int getY()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the reference object with which to compare.
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |