|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gecco.server.qmanager.QueuedAutomaton
This class encapsulates data about an automaton in the queue of the server. It consists of data about which automaton it is, that is, the position on the map, and data about which place in the queue it has, that is, the time until the automaton should be taken from the queue and processed in some way.
Field Summary | |
private long |
absoluteTimeToExecute
Description of the Field |
private int |
x
Description of the Field |
private int |
y
Description of the Field |
Constructor Summary | |
QueuedAutomaton(int x,
int y,
long absoluteTimeToExecute)
Constructor for the QueuedAutomaton object |
Method Summary | |
int |
compareTo(Object a)
Compares this automaton with a given automaton. |
boolean |
equals(Object a)
Tests whether to QueuedAutomatons are equal, which is true iff they have the same coordinates and the same time for process. |
long |
getTimeToExecute()
Gets the time when the automaton shoule be processed. |
int |
getX()
Gets the x coordinate of the automaton |
int |
getY()
Gets the y coordinate of the automaton |
void |
setTimeToExecute(long newTimeToExecute)
Sets the time when the automaton should be processed. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private int x
private int y
private long absoluteTimeToExecute
Constructor Detail |
public QueuedAutomaton(int x, int y, long absoluteTimeToExecute)
x
- The x-coordinate of the automatony
- The x-coordinate of the automatonabsoluteTimeToExecute
- The time when the automaton should be
processed. This is absolute time, _not_ a relative time from the
current time.Method Detail |
public void setTimeToExecute(long newTimeToExecute)
newTimeToExecute
- The new TimeToExecute valuepublic int getX()
public int getY()
public long getTimeToExecute()
public boolean equals(Object a)
equals
in class Object
a
- Should be a QueuedAutomatonpublic int compareTo(Object a)
compareTo
in interface Comparable
a
- Should be a QueuedAutomaton
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |