| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.drools.util.BinaryHeapFifoQueue
public class BinaryHeapFifoQueue
| Constructor Summary | |
|---|---|
| BinaryHeapFifoQueue(java.util.Comparator comparator)Constructs a new BinaryHeapthat will use the given
 comparator to order its elements. | |
| BinaryHeapFifoQueue(java.util.Comparator comparator,
                    int capacity)Constructs a new BinaryHeap. | |
| Method Summary | |
|---|---|
|  void | clear()Clears all elements from queue. | 
|  Queueable | dequeue()Returns the Queueable on top of heap and remove it. | 
|  Queueable | dequeue(int index) | 
|  void | enqueue(Queueable element)Inserts an Queueable into queue. | 
|  Queueable[] | getQueueable() | 
|  boolean | isEmpty()Tests if queue is empty. | 
|  boolean | isFull()Tests if queue is full. | 
|  int | size()Returns the number of elements in this heap. | 
|  java.lang.Object[] | toArray() | 
|  java.lang.Object[] | toArray(java.lang.Object[] a) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public BinaryHeapFifoQueue(java.util.Comparator comparator)
BinaryHeap that will use the given
 comparator to order its elements.
comparator - the comparator used to order the elements, null
                   means use natural order
public BinaryHeapFifoQueue(java.util.Comparator comparator,
                           int capacity)
BinaryHeap.
comparator - the comparator used to order the elements, null
                   means use natural ordercapacity - the initial capacity for the heap
java.lang.IllegalArgumentException - if capacity is <= 0| Method Detail | 
|---|
public void clear()
public boolean isEmpty()
true if queue is empty; false
         otherwise.public boolean isFull()
true if queue is full; false
         otherwise.public int size()
public void enqueue(Queueable element)
element - the Queueable to be insertedpublic Queueable dequeue() throws java.util.NoSuchElementException
java.util.NoSuchElementException - if isEmpty() == truepublic Queueable dequeue(int index)
public Queueable[] getQueueable()
public java.lang.Object[] toArray()
public java.lang.Object[] toArray(java.lang.Object[] a)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||