|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sysModel.env.ASquareEnv.Location
public class ASquareEnv.Location
Concrete location class.
Field Summary | |
---|---|
private double |
_x
Column. |
private double |
_y
Row. |
Constructor Summary | |
---|---|
ASquareEnv.Location()
Constructor. |
|
ASquareEnv.Location(double x,
double y)
Constructor. |
Method Summary | |
---|---|
ASquareEnv.Location |
getNeighbor(ASquareEnv.Direction dir)
Return the location of a neighbor in the given direction. |
double |
getX()
Return column. |
double |
getY()
Return row. |
boolean |
inField(ASquareEnv.Location other)
Return true of the other location is in the same field as this location. |
ASquareEnv.Location |
parse(Lexer l)
Parses a location. |
boolean |
same(ASquareEnv.Location other)
Return true of this location is the same as the other. |
void |
setX(double _x)
Set column. |
void |
setY(double _y)
Set row. |
java.lang.String |
toString()
Overridden toString method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private double _x
private double _y
Constructor Detail |
---|
public ASquareEnv.Location()
public ASquareEnv.Location(double x, double y)
x
- columny
- rowMethod Detail |
---|
public double getX()
public double getY()
public void setX(double _x)
_x
- New columnpublic void setY(double _y)
_y
- New rowpublic boolean same(ASquareEnv.Location other)
other
- other location
public boolean inField(ASquareEnv.Location other)
other
- location to compare to
public ASquareEnv.Location getNeighbor(ASquareEnv.Direction dir)
dir
- the direction of the neighbor to be returned
public java.lang.String toString()
toString
in class java.lang.Object
public ASquareEnv.Location parse(Lexer l)
l
- parser to read from
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |