|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Position
public class Position
The class Position
represents a position on the field.
Field Summary | |
---|---|
static java.lang.String |
ERR_MOVE_POS_FORMAT
error message: move position |
static java.lang.String |
REGEX_BOARDLIKE_FORMAT
The format of a position as a String |
int |
x
The x-coordinate in the Cartesian coordinate system |
int |
y
The y-coordinate in the Cartesian coordinate system |
Constructor Summary | |
---|---|
Position(int x,
int y)
Constructor for the class Position. |
|
Position(java.lang.String position)
Constructor for the class Position. |
Method Summary | |
---|---|
java.lang.String |
toString()
Return a String representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String REGEX_BOARDLIKE_FORMAT
public static final java.lang.String ERR_MOVE_POS_FORMAT
public final int x
public final int y
Constructor Detail |
---|
public Position(java.lang.String position)
position
- the String with the positionpublic Position(int x, int y)
x
- the x-coordinate in the Cartesian coordinate systemy
- the y-coordinate in the Cartesian coordinate systemMethod Detail |
---|
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 |