|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractQueue<E>
java.util.PriorityQueue<E>
fi.joensuu.cs.tra.PriorityQueue<E>
public class PriorityQueue<E>
PriorityQueue is a convenience extension of java.util.PriorityQueue for relocation.
PriorityQueue,
Serialized Form| Constructor Summary | |
|---|---|
PriorityQueue()
Creates a PriorityQueue with the default initial capacity (11) that orders its elements according to their natural ordering (using java.util.Comparable). |
|
PriorityQueue(java.util.Collection<? extends E> c)
Creates a PriorityQueue containing the elements in the specified collection. |
|
PriorityQueue(int initialCapacity)
Creates a PriorityQueue with the specified initial capacity that orders its elements according to their natural ordering (using java.util.Comparable). |
|
PriorityQueue(int initialCapacity,
java.util.Comparator<? super E> comparator)
Creates a PriorityQueue with the specified initial capacity that orders its elements according to the specified comparator. |
|
PriorityQueue(PriorityQueue<? extends E> c)
Creates a PriorityQueue containing the elements in the specified collection. |
|
PriorityQueue(java.util.SortedSet<? extends E> c)
Creates a PriorityQueue containing the elements in the specified collection. |
|
| Method Summary | |
|---|---|
boolean |
add(E o)
|
void |
clear()
|
java.util.Comparator<? super E> |
comparator()
|
java.util.Iterator<E> |
iterator()
|
E |
poll()
|
boolean |
remove(java.lang.Object o)
|
int |
size()
|
| Methods inherited from class java.util.PriorityQueue |
|---|
offer, peek |
| Methods inherited from class java.util.AbstractQueue |
|---|
addAll, element, remove |
| Methods inherited from class java.util.AbstractCollection |
|---|
contains, containsAll, isEmpty, 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 |
|---|
contains, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public PriorityQueue()
java.util.Comparable).
public PriorityQueue(int initialCapacity)
java.util.Comparable).
initialCapacity - the initial capacity for this priority queue.
java.lang.IllegalArgumentException - if initialCapacity is less
than 1
public PriorityQueue(int initialCapacity,
java.util.Comparator<? super E> comparator)
initialCapacity - the initial capacity for this priority queue.comparator - the comparator used to order this priority queue.
If null then the order depends on the elements' natural
ordering.
java.lang.IllegalArgumentException - if initialCapacity is less
than 1public PriorityQueue(java.util.Collection<? extends E> c)
c - the collection whose elements are to be placed
into this priority queue.
java.lang.ClassCastException - if elements of the specified collection
cannot be compared to one another according to the priority
queue's ordering.
java.lang.NullPointerException - if c or any element within it
is nullpublic PriorityQueue(PriorityQueue<? extends E> c)
c - the collection whose elements are to be placed
into this priority queue.
java.lang.ClassCastException - if elements of the specified collection
cannot be compared to one another according to the priority
queue's ordering.
java.lang.NullPointerException - if c or any element within it
is nullpublic PriorityQueue(java.util.SortedSet<? extends E> c)
c - the collection whose elements are to be placed
into this priority queue.
java.lang.ClassCastException - if elements of the specified collection
cannot be compared to one another according to the priority
queue's ordering.
java.lang.NullPointerException - if c or any element within it
is null| Method Detail |
|---|
public boolean add(E o)
add in interface java.util.Collection<E>add in class java.util.PriorityQueue<E>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<E>remove in class java.util.PriorityQueue<E>public java.util.Iterator<E> iterator()
iterator in interface java.lang.Iterable<E>iterator in interface java.util.Collection<E>iterator in class java.util.PriorityQueue<E>public int size()
size in interface java.util.Collection<E>size in class java.util.PriorityQueue<E>public void clear()
clear in interface java.util.Collection<E>clear in class java.util.PriorityQueue<E>public E poll()
poll in interface java.util.Queue<E>poll in class java.util.PriorityQueue<E>public java.util.Comparator<? super E> comparator()
comparator in class java.util.PriorityQueue<E>
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||