public class BoundedPriorityQueue<T> extends java.util.PriorityQueue<T>
| Constructor and Description |
|---|
BoundedPriorityQueue(int capacityBound)
Constructor using natural order
|
BoundedPriorityQueue(int capacityBound,
java.util.Comparator<T> comparator)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
offer(T element)
Add a single element
|
add, clear, comparator, contains, iterator, peek, poll, remove, size, spliterator, toArray, toArraycontainsAll, isEmpty, removeAll, retainAll, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic BoundedPriorityQueue(int capacityBound)
capacityBound - maximal number of elements that are retainedpublic BoundedPriorityQueue(int capacityBound, java.util.Comparator<T> comparator)
capacityBound - maximal number of elements that are retainedcomparator - Comparator used to compare elements