org.metasyntactic.structures
Class Heap

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--org.metasyntactic.structures.Heap
All Implemented Interfaces:
java.util.Collection

public class Heap
extends java.util.AbstractCollection


Constructor Summary
Heap()
          Creates new Heap
Heap(java.util.Comparator comparator)
           
 
Method Summary
 boolean add(java.lang.Object o)
           
 java.lang.Object getRoot()
           
 java.util.Iterator iterator()
           
static void main(java.lang.String[] args)
           
 java.lang.Object removeRoot()
           
 int size()
           
 
Methods inherited from class java.util.AbstractCollection
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

Heap

public Heap()
Creates new Heap


Heap

public Heap(java.util.Comparator comparator)
Method Detail

size

public int size()
Specified by:
size in interface java.util.Collection
Specified by:
size in class java.util.AbstractCollection

add

public boolean add(java.lang.Object o)
            throws java.lang.IllegalArgumentException
Specified by:
add in interface java.util.Collection
Overrides:
add in class java.util.AbstractCollection
java.lang.IllegalArgumentException

getRoot

public java.lang.Object getRoot()

removeRoot

public java.lang.Object removeRoot()

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.util.Collection
Specified by:
iterator in class java.util.AbstractCollection

main

public static void main(java.lang.String[] args)