org.geotools.graph.util
Class PriorityQueue
Object
PriorityQueue
- All Implemented Interfaces:
- Iterable, Collection, Queue
public class PriorityQueue
- extends Object
- implements Collection, Queue
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESIZE_FACTOR
public static double RESIZE_FACTOR
PriorityQueue
public PriorityQueue(Comparator comparator)
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-2010 Geotools. All Rights Reserved.