|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.tudelft.simulation.dsol.formalisms.devs.AbstractSimEvent
The AbstractSimEvent forms the basement for SimEvents and defines a compare method by which eventLists can compare priority of the event.
(c) copyright 2003 Delft
University of Technology , the Netherlands.
See for project information
www.simulation.tudelft.nl
License of use: General Public
License (GPL) , no warranty
| Field Summary | |
protected double |
absoluteExecutionTime
absoluteExecutionTime reflects the time at which the event is scheduled |
protected long |
id
the id used in compare statements |
protected short |
priority
priority reflects the priority of the event |
| Fields inherited from interface nl.tudelft.simulation.dsol.formalisms.devs.SimEventInterface |
MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY |
| Constructor Summary | |
AbstractSimEvent(double executionTime)
The constuctor of the event stores the time the event must be executed and the object and method to invoke |
|
AbstractSimEvent(double executionTime,
short priority)
The constuctor of the event stores the time the event must be executed and the object and method to invoke |
|
| Method Summary | |
int |
compareTo(java.lang.Object object)
|
abstract void |
execute()
executes the simEvent |
double |
getAbsoluteExecutionTime()
|
long |
getID()
sets the id of an event. |
short |
getPriority()
|
void |
setID(long id)
sets the id of an event. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected double absoluteExecutionTime
protected short priority
protected long id
| Constructor Detail |
public AbstractSimEvent(double executionTime)
executionTime - reflects the time the event has to be executed.
public AbstractSimEvent(double executionTime,
short priority)
executionTime - reflects the time the event has to be executed.priority - reflects the priority of the event| Method Detail |
public int compareTo(java.lang.Object object)
compareTo in interface java.lang.ComparableComparable.compareTo(java.lang.Object)
public abstract void execute()
throws SimRuntimeException
execute in interface SimEventInterfaceSimRuntimeException - on execution failurepublic double getAbsoluteExecutionTime()
getAbsoluteExecutionTime in interface SimEventInterfacepublic short getPriority()
getPriority in interface SimEventInterfacepublic long getID()
SimEventInterface
getID in interface SimEventInterfacepublic void setID(long id)
SimEventInterface
setID in interface SimEventInterfaceid - The id to set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||