|
||||||||||
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.
Constructor Summary | |
QueuedAutomaton(int x,
int y,
double 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. |
double |
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(double newTimeToExecute)
Sets the time when the automaton should be processed. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QueuedAutomaton(int x, int y, double 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 game time, _not_ a relative time from the
current time.Method Detail |
public void setTimeToExecute(double newTimeToExecute)
newTimeToExecute
- The new TimeToExecute valuepublic int getX()
public int getY()
public double 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 |