ix.isim
Class TimedEvent

java.lang.Object
  extended by ix.isim.TimedEvent

public class TimedEvent
extends java.lang.Object


Field Summary
static int COMPLETED
           
protected  Activity event
          the agenda entry for the activity of this event
static int EXECUTING
           
static int FAILED
           
protected  int status
          the status of this event
static java.lang.String[] statusString
           
protected  java.lang.String thread
          the thread to which this event belongs
protected  long timeInMillis
          the time after the start of the simulation when this event should occur (given as a duration)
static int WAITING
          the stutus values for events
 
Method Summary
 Activity getActivity()
           
 long getRelativeTime()
           
 int getStatus()
           
 java.lang.String getThread()
           
static TimedEvent getTimedEvent(LList list)
          This factory method must be used to create new timed events.
protected  void setRelativeTime(long delay)
           
protected  void setStatus(int status)
           
protected  void setThread(java.lang.String thread)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WAITING

public static final int WAITING
the stutus values for events

See Also:
Constant Field Values

EXECUTING

public static final int EXECUTING
See Also:
Constant Field Values

COMPLETED

public static final int COMPLETED
See Also:
Constant Field Values

FAILED

public static final int FAILED
See Also:
Constant Field Values

statusString

public static final java.lang.String[] statusString

timeInMillis

protected long timeInMillis
the time after the start of the simulation when this event should occur (given as a duration)


event

protected Activity event
the agenda entry for the activity of this event


thread

protected java.lang.String thread
the thread to which this event belongs


status

protected int status
the status of this event

Method Detail

getRelativeTime

public long getRelativeTime()

setRelativeTime

protected void setRelativeTime(long delay)

getActivity

public Activity getActivity()

setThread

protected void setThread(java.lang.String thread)

getThread

public java.lang.String getThread()

setStatus

protected void setStatus(int status)

getStatus

public int getStatus()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTimedEvent

public static TimedEvent getTimedEvent(LList list)
                                throws java.text.ParseException

This factory method must be used to create new timed events. It attempts to parse the the given LList into a timed event assuming the following syntax:

 TimedEvent ::= ( atTimeSy ISO-duration Activity )
 

A ParseException will be thrown if any of the components do not correspond to the expected syntax.

Parameters:
list - the LList representing the timed event
Returns:
TimedEvent the new timed event
Throws:
java.text.ParseException - if the syntax in incorrect