|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectsema.Event
An event is used to plan the execution of a task in the futur.
An Event is linked with an Engine.
It contains a 'whatToDo' and a date at which to execute the task.
| Field Summary | |
java.lang.Double |
date
the date in milliseconde of simulated secs. |
| Constructor Summary | |
Event(double date,
Engine e)
Constructs an event at the given date and ask that it is registered in the given engine. |
|
| Method Summary | |
int |
compareTo(java.lang.Object o)
The comparable interface is used to sort events by date. |
protected void |
delete()
Delete the event. |
boolean |
execute()
It is the method called by the engine at run time. |
protected abstract void |
whatToDo()
The action to override in order to execute something. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.lang.Double date
| Constructor Detail |
public Event(double date,
Engine e)
| Method Detail |
protected abstract void whatToDo()
public boolean execute()
protected void delete()
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||