|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.util.BinaryHeapFifoQueue

| Constructor Summary | |
BinaryHeapFifoQueue(java.util.Comparator comparator)
Constructs a new BinaryHeap that 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.
java.lang.IllegalArgumentException - if capacity is <= 0comparator - the comparator used to order the elements, null
means use natural ordercapacity - the initial capacity for the heap| Method Detail |
public void clear()
public boolean isEmpty()
isEmpty in interface Queuetrue if queue is empty; false
otherwise.public boolean isFull()
true if queue is full; false
otherwise.public int size()
public void enqueue(Queueable element)
enqueue in interface Queueelement - the Queueable to be inserted
public Queueable dequeue()
throws java.util.NoSuchElementException
dequeue in interface Queuejava.util.NoSuchElementException - if isEmpty() == true
public Queueable dequeue(int index)
dequeue in interface Queueindex - 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 | |||||||||