|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.colorado.cs.ns2.animation.EventQueue
public class EventQueue
A Queue ADT implementation to store simulation events parsed from the NS2 trace file.
Field Summary | |
---|---|
private TraceEventNode |
head
References to the head and tail of the Queue. |
private long |
size
Stores the current Queue size. |
private TraceEventNode |
tail
References to the head and tail of the Queue. |
Constructor Summary | |
---|---|
EventQueue()
Default constructor. |
Method Summary | |
---|---|
TraceEvent |
dequeue()
Removes a trace event from the head of the Queue. |
void |
enqueue(TraceEvent event)
Inserts a new trace event at the tail of the Queue. |
TraceEvent |
getFirst()
Returns a reference to the head of the Queue. |
TraceEvent |
getLast()
Returns a reference to the tail of the Queue. |
boolean |
isEmpty()
Returns True if the Queue is empty. |
long |
size()
Returns the size of the Queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private TraceEventNode head
private TraceEventNode tail
private long size
Constructor Detail |
---|
public EventQueue()
Method Detail |
---|
public TraceEvent dequeue()
dequeue
in interface TraceEventQueue
public void enqueue(TraceEvent event)
enqueue
in interface TraceEventQueue
public long size()
size
in interface TraceEventQueue
public TraceEvent getFirst()
getFirst
in interface TraceEventQueue
public TraceEvent getLast()
getLast
in interface TraceEventQueue
public boolean isEmpty()
isEmpty
in interface TraceEventQueue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |