|
||||||||||
| 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 TraceEventQueuepublic void enqueue(TraceEvent event)
enqueue in interface TraceEventQueuepublic long size()
size in interface TraceEventQueuepublic TraceEvent getFirst()
getFirst in interface TraceEventQueuepublic TraceEvent getLast()
getLast in interface TraceEventQueuepublic boolean isEmpty()
isEmpty in interface TraceEventQueue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||