edu.cmu.emulator.event
Class EmuEvent
java.lang.Object
edu.cmu.emulator.event.EmuEvent
- All Implemented Interfaces:
- Comparable
- Direct Known Subclasses:
- MethodCall
public class EmuEvent
- extends Object
- implements Comparable
The class which represents an event in the Emulator. It
encapsulates all the characteristics of an event: the time at
which the event should be executed, the target of the event,
the event id, etc.
FIXME - THE EVENT PARSING REALLY DOESN'T BELONG IN THIS CLASS
NEITHER DO THE ET_ ETC. BELONG HERE SINCE THESE ARE REALLY
SCRIPT COMMANDS.
name
protected String name
time
protected long time
target
protected EmuEventTarget target
source
protected Throwable source
eid
protected long eid
next
protected EmuEvent next
obj
protected MovableObject obj
iThread
protected boolean iThread
saveSourceInformation
protected static final boolean saveSourceInformation
- See Also:
- Constant Field Values
EmuEvent
public EmuEvent(long time)
EmuEvent
public EmuEvent(long time,
EmuEventTarget target)
EmuEvent
public EmuEvent(long time,
EmuEventTarget target,
MovableObject obj)
init
public void init(long time)
init
public void init(long time,
EmuEventTarget target)
setEID
public void setEID(long eid)
clearEID
public void clearEID()
saveStackTrace
protected void saveStackTrace()
setTime
public void setTime(long time)
getTime
public long getTime()
getObject
public MovableObject getObject()
getTarget
public EmuEventTarget getTarget()
getSource
public Throwable getSource()
toString
public String toString()
- Used to display the contents of the event.
- Overrides:
toString
in class Object
compareTo
public final int compareTo(Object obj)
- Specified by:
compareTo
in interface Comparable
getEID
public long getEID()
setNext
public void setNext(EmuEvent next)
getNext
public EmuEvent getNext()
setIThread
public void setIThread(boolean iThread)
getIThread
public boolean getIThread()
getDebugString
public String getDebugString()
Copyright © 2013. All Rights Reserved.