|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.zcu.fav.kiv.jsim.JSimCalendarEvent
public class JSimCalendarEvent
A JSimCalendarEvent represents one wake-up event in a J-Sim calendar. It contains information about a process and a time point when the process should be activated. You should never need to create an instance of this class. Note: This class has a natural ordering that is inconsistent with equals().
Field Summary | |
---|---|
private long |
creationTime
The real (wallclock) time of the event's creation. |
private JSimProcess |
process
The process to be activated (woken up). |
private long |
processNumber
The process's number. |
private double |
time
The simulation time point the process is scheduled for. |
Constructor Summary | |
---|---|
JSimCalendarEvent(double time,
JSimProcess process)
Creates a new calendar event with the specified time and process. |
Method Summary | |
---|---|
int |
compareTo(JSimCalendarEvent ce)
Compares this event with another one. |
protected long |
getCreationTime()
Returns this event's creation time. |
JSimProcess |
getProcess()
Returns the process referred to by the event. |
long |
getProcessNumber()
Returns the number of the process referred to by the event. |
double |
getTime()
Returns the absolute activation time of the event. |
java.lang.String |
toString()
Returns a string representation of the calendar event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private double time
private JSimProcess process
private long processNumber
private long creationTime
Constructor Detail |
---|
public JSimCalendarEvent(double time, JSimProcess process) throws java.lang.NullPointerException
time
- The absolute simulation time (not a delta) of activation.process
- The process to be activated.
java.lang.NullPointerException
- This exception is thrown out if the process to be activated is null.Method Detail |
---|
public double getTime()
public JSimProcess getProcess()
public long getProcessNumber()
protected long getCreationTime()
public int compareTo(JSimCalendarEvent ce)
compareTo
in interface java.lang.Comparable<JSimCalendarEvent>
java.lang.ClassCastException
- This exception is thrown out when the specified object cannot be typecasted to JSimCalendarEvent.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |