org.geotools.graph.util
Class PriorityQueue

Object
  extended by PriorityQueue
All Implemented Interfaces:
Iterable, Collection, Queue

public class PriorityQueue
extends Object
implements Collection, Queue


Field Summary
static double RESIZE_FACTOR
           
 
Constructor Summary
PriorityQueue(Comparator comparator)
           
 
Method Summary
 boolean add(Object o)
           
 boolean addAll(Collection c)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection c)
           
 Object deq()
           
 void enq(Object object)
           
 Object extract()
           
 Object get(int i)
           
 Object getRoot()
           
 void init(int size)
           
 void insert(Object value)
           
 boolean isEmpty()
           
 Iterator iterator()
           
 void remove(int i)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection c)
           
 boolean retainAll(Collection c)
           
 int size()
           
 void swap(int i, int j)
          TODO: DOCUMENT ME!
 Object[] toArray()
           
 Object[] toArray(Object[] a)
           
 void update()
           
 int update(int i)
           
 void update(Object value)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Collection
equals, hashCode
 

Field Detail

RESIZE_FACTOR

public static double RESIZE_FACTOR
Constructor Detail

PriorityQueue

public PriorityQueue(Comparator comparator)
Method Detail

init

public void init(int size)

insert

public void insert(Object value)

extract

public Object extract()

getRoot

public Object getRoot()

update

public void update()

update

public int update(int i)

update

public void update(Object value)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection
Specified by:
isEmpty in interface Queue

size

public int size()
Specified by:
size in interface Collection

swap

public void swap(int i,
                 int j)
TODO: DOCUMENT ME! Note that this method should be used cautiously


clear

public void clear()
Specified by:
clear in interface Collection
Specified by:
clear in interface Queue

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection

add

public boolean add(Object o)
Specified by:
add in interface Collection

get

public Object get(int i)

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection

remove

public void remove(int i)

addAll

public boolean addAll(Collection c)
Specified by:
addAll in interface Collection

containsAll

public boolean containsAll(Collection c)
Specified by:
containsAll in interface Collection

removeAll

public boolean removeAll(Collection c)
Specified by:
removeAll in interface Collection

retainAll

public boolean retainAll(Collection c)
Specified by:
retainAll in interface Collection

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection

toArray

public Object[] toArray(Object[] a)
Specified by:
toArray in interface Collection

deq

public Object deq()
Specified by:
deq in interface Queue

enq

public void enq(Object object)
Specified by:
enq in interface Queue


Copyright © 1996-2009 Geotools. All Rights Reserved.