- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.NavigableSet<E>, java.util.Set<E>, java.util.SortedSet<E>
public class BoundedPriorityQueue<E>
extends java.util.TreeSet<E>
A priority queue that has a fixed bounded size.
Notice that this class is implemented using a sorted set, which
requires consistency between euqals() and compareTo() method.
It decides whether two objects are equal based on their compareTo
value; in other words, if two objects have the same priority,
only one will be stored.
- Author:
- Mengqiu Wang
- See Also:
- Serialized Form