com.cometway.util
Interface IHeap

All Known Implementing Classes:
BinaryHeap

public interface IHeap

IHeap is an interface for a heap


Method Summary
 boolean delete(IHeapItem deleteItem)
          Deletes a specific heap item from this heap
 IHeapItem deleteMin()
          Removes and returns the minimum IHeapItem in this heap
 IHeapItem findMin()
          Method returns the minimum IHeapItem in this heap
 boolean insert(IHeapItem newItem)
          Adds a IHeapItem to this heap.
 boolean isEmpty()
          Method returns true if this heap contains no elements and false otherwise
 int size()
          size: method returns the number of elements in this heap
 

Method Detail

insert

boolean insert(IHeapItem newItem)
Adds a IHeapItem to this heap.


delete

boolean delete(IHeapItem deleteItem)
Deletes a specific heap item from this heap


findMin

IHeapItem findMin()
Method returns the minimum IHeapItem in this heap


deleteMin

IHeapItem deleteMin()
Removes and returns the minimum IHeapItem in this heap


isEmpty

boolean isEmpty()
Method returns true if this heap contains no elements and false otherwise


size

int size()
size: method returns the number of elements in this heap