| |
|
| java.lang.Object org.drools.util.BinaryHeapQueue
BinaryHeapQueue | public BinaryHeapQueue(Comparator comparator)(Code) | | Constructs a new BinaryHeap that will use the given
comparator to order its elements.
Parameters: comparator - the comparator used to order the elements, nullmeans use natural order |
BinaryHeapQueue | public BinaryHeapQueue(Comparator comparator, int capacity)(Code) | | Constructs a new BinaryHeap .
Parameters: comparator - the comparator used to order the elements, nullmeans use natural order Parameters: capacity - the initial capacity for the heap throws: IllegalArgumentException - if capacity is <= 0 |
clear | public void clear()(Code) | | Clears all elements from queue.
|
enqueue | public void enqueue(Queueable element)(Code) | | Inserts an Queueable into queue.
Parameters: element - the Queueable to be inserted |
isEmpty | public boolean isEmpty()(Code) | | Tests if queue is empty.
true if queue is empty; false otherwise. |
isFull | public boolean isFull()(Code) | | Tests if queue is full.
true if queue is full; false otherwise. |
size | public int size()(Code) | | Returns the number of elements in this heap.
the number of elements in this heap |
|
|
|