- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<PrioritizedState>, Collection<PrioritizedState>, NavigableSet<PrioritizedState>, Set<PrioritizedState>, SortedSet<PrioritizedState>
public class StaticPriorityQueue
extends TreeSet<PrioritizedState>
container for statically prioritized states, based on bounded
RB trees
TreeSet is a better choice than PriorityQueue since the size
constraint means we have to remove elements from both ends, which
is inefficient with heaps. A simple (binary) sorted array using
block copy can be more efficient, but that very much depends on
queue size and processor, so it's not really worth the trouble
<2do> this needs to be re-evaluated in light of the stupid fact
that pollFirst()/pollLast() are only in Java 1.6 and we can't switch
yet (no Java 1.6 for PPC), which forces us to do some shuffling to
make remove(last()) work as expected
- See Also:
- Serialized Form