public static class BinaryHeapQueue.Synchronized extends BinaryHeapQueue
BinaryHeapQueue.Synchronized
log
Constructor and Description |
---|
Synchronized() |
Synchronized(Comparator<Activation> comparator) |
Synchronized(Comparator<Activation> comparator,
int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all elements from queue.
|
Activation |
dequeue()
Returns the Queueable on top of heap and remove it.
|
Activation |
dequeue(Activation activation) |
void |
enqueue(Activation element)
Inserts an Queueable into queue.
|
Activation[] |
getAndClear() |
boolean |
isEmpty()
Tests if queue is empty.
|
boolean |
isFull()
Tests if queue is full.
|
Activation |
peek() |
int |
size()
Returns the number of elements in this heap.
|
Object[] |
toArray(Object[] a) |
percolateDownMaxHeap, percolateUpMaxHeap, percolateUpMaxHeap, readExternal, toString, writeExternal
public Synchronized()
public Synchronized(Comparator<Activation> comparator)
public Synchronized(Comparator<Activation> comparator, int capacity)
public void clear()
BinaryHeapQueue
clear
in class BinaryHeapQueue
public Activation[] getAndClear()
getAndClear
in class BinaryHeapQueue
public boolean isEmpty()
BinaryHeapQueue
isEmpty
in interface Queue
isEmpty
in class BinaryHeapQueue
true
if queue is empty; false
otherwise.public boolean isFull()
BinaryHeapQueue
isFull
in class BinaryHeapQueue
true
if queue is full; false
otherwise.public int size()
BinaryHeapQueue
size
in class BinaryHeapQueue
public Activation peek()
peek
in class BinaryHeapQueue
public void enqueue(Activation element)
BinaryHeapQueue
enqueue
in interface Queue
enqueue
in class BinaryHeapQueue
element
- the Queueable to be insertedpublic Activation dequeue() throws NoSuchElementException
BinaryHeapQueue
dequeue
in interface Queue
dequeue
in class BinaryHeapQueue
NoSuchElementException
- if isEmpty() == true
public Activation dequeue(Activation activation)
dequeue
in interface Queue
dequeue
in class BinaryHeapQueue
public Object[] toArray(Object[] a)
toArray
in class BinaryHeapQueue
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.