support.heap
Interface HeapWrapper<K,V>

All Superinterfaces:
AdaptablePriorityQueue<K,V>, PriorityQueue<K,V>
All Known Implementing Classes:
MyHeap

public interface HeapWrapper<K,V>
extends AdaptablePriorityQueue<K,V>

A simple wrapper around an AdaptablePriorityQueue that provides access to the underlying tree.


Method Summary
 CompleteBinaryTree<Entry<K,V>> getTree()
          Returns a CompleteBinaryTree that will allow the visualizer access to private members, shattering encapsulation, but allowing visualization of the heap.
 
Methods inherited from interface net.datastructures.AdaptablePriorityQueue
remove, replaceKey, replaceValue
 
Methods inherited from interface net.datastructures.PriorityQueue
insert, isEmpty, min, removeMin, size
 

Method Detail

getTree

CompleteBinaryTree<Entry<K,V>> getTree()
Returns a CompleteBinaryTree that will allow the visualizer access to private members, shattering encapsulation, but allowing visualization of the heap. This is the only method needed to satisfy HeapWrapper interface implementation.

Returns:
the underlying binary tree on which the heap is based