heap
Class MyHeapEntry<K,V>

java.lang.Object
  extended by heap.MyHeapEntry<K,V>
All Implemented Interfaces:
Entry<K,V>

public class MyHeapEntry<K,V>
extends Object
implements Entry<K,V>

Represents a key/value pair to be stored in a data structure, such as a heap. Entry is a very limited accessing interface, so you may wish to add additional methods. In particular, think about the relationship of the Entry with its location in the heap's binary tree. All methods run in O(1) time. Feel free to add additional comments.


Constructor Summary
MyHeapEntry()
          Default constructor.
 
Method Summary
 K getKey()
           
 V getValue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyHeapEntry

public MyHeapEntry()
Default constructor. You may wish to modify the parameters.

Method Detail

getKey

public K getKey()
Specified by:
getKey in interface Entry<K,V>
Returns:
the key stored in this entry

getValue

public V getValue()
Specified by:
getValue in interface Entry<K,V>
Returns:
the value stored in this entry