|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mhhe.clrs2e.Heap.Handle
Nested class for handles within a heap. To be used by the
subclasses MinHeapPriorityQueue
and MaxHeapPriorityQueue
. Handle
objects are stored
in the heap's array, and they are opaque objects given by
MinHeapPriorityQueue
and
MaxHeapPriorityQueue
to users of priority queues.
Field Summary | |
protected int |
index
Index into the heap array. |
protected com.mhhe.clrs2e.DynamicSetElement |
info
The information actually stored. |
Constructor Summary | |
protected |
Heap.Handle(int index,
com.mhhe.clrs2e.DynamicSetElement info)
Initializes a Handle . |
Method Summary | |
int |
compareTo(java.lang.Object e)
Compares the DynamicSetElement stored in this
Handle to that stored in another. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int index
protected com.mhhe.clrs2e.DynamicSetElement info
Constructor Detail |
protected Heap.Handle(int index, com.mhhe.clrs2e.DynamicSetElement info)
Handle
.
index
- Index into the heap's array.info
- Information stored.Method Detail |
public int compareTo(java.lang.Object e)
DynamicSetElement
stored in this
Handle
to that stored in another.
compareTo
in interface java.lang.Comparable
e
- The other Handle
object.
Handle
's
DynamicSetElement
is less; 0 if the objects are
equal; a positive integer if this Handle
's
DynamicSetElement
is greater.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |