org.drools.reteoo.impl
Class PriorityQueue

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.AbstractSequentialList
                    |
                    +--java.util.LinkedList
                          |
                          +--org.drools.reteoo.impl.PriorityQueue
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable

public class PriorityQueue
extends java.util.LinkedList

Queue that maintains the entries in sorted order.

Author:
bob mcwhirter
See Also:
Serialized Form

Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
PriorityQueue()
          Construct.
 
Method Summary
 void add(java.lang.Object item, int priority)
          Add an item to this queue.
 java.util.ListIterator listIterator()
          Retrieve a bidrectional iterator of the members of this queue.
 java.lang.Object removeFirst()
          Remove the first element from this queue.
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeLast, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, subList
 

Constructor Detail

PriorityQueue

public PriorityQueue()
Construct.
Method Detail

add

public void add(java.lang.Object item,
                int priority)
Add an item to this queue.
Parameters:
item - The item to add.
priority - The priority of the item.

listIterator

public java.util.ListIterator listIterator()
Retrieve a bidrectional iterator of the members of this queue.
Overrides:
listIterator in class java.util.AbstractList
Returns:
The bidirectional list iterator.

removeFirst

public java.lang.Object removeFirst()
                             throws java.util.NoSuchElementException
Remove the first element from this queue.
Overrides:
removeFirst in class java.util.LinkedList
Returns:
The removed element.
Throws:
java.util.NoSuchElementException - If this queue is empty.


Copyright © 2001-2002 The Werken Company. All Rights Reserved.