|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.cogent.HeapElement
Wrapper class to allow a Event and a priority to enter the queue. Implements Comparable to allow the priority queue's heap to work
| Field Summary | |
private SimEvent |
myEvent
|
private long |
myPriority
|
| Constructor Summary | |
HeapElement(SimEvent argEvent,
long argPriority)
Constructs a heap element from an event and a priority |
|
| Method Summary | |
int |
compareTo(java.lang.Object o1)
This method satisfies the Comparable interface and provides for an ordering between this element and the parameter. |
SimEvent |
getEvent()
Get the associated SimEvent |
long |
getPriority()
Get the associate priority |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private SimEvent myEvent
private long myPriority
| Constructor Detail |
public HeapElement(SimEvent argEvent,
long argPriority)
argEvent - the SimEvent to insert into the queueargPriority - the associated priority| Method Detail |
public SimEvent getEvent()
public long getPriority()
public int compareTo(java.lang.Object o1)
compareTo in interface java.lang.Comparableo1 - Object to compare to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||