public abstract class AbstractBoundedNodeQueue<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractBoundedNodeQueue.Node<T> |
Modifier | Constructor and Description |
---|---|
protected |
AbstractBoundedNodeQueue(int capacity) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T value) |
boolean |
addNode(AbstractBoundedNodeQueue.Node<T> n) |
int |
capacity() |
boolean |
isEmpty() |
T |
peek() |
protected AbstractBoundedNodeQueue.Node<T> |
peekNode() |
T |
poll()
Removes the first element of this queue if any
|
AbstractBoundedNodeQueue.Node<T> |
pollNode()
Removes the first element of this queue if any
|
int |
size()
Returns an approximation of the queue's "current" size
|
protected final AbstractBoundedNodeQueue.Node<T> peekNode()
public final T peek()
public final int capacity()
public final boolean add(T value)
public final boolean addNode(AbstractBoundedNodeQueue.Node<T> n)
public final boolean isEmpty()
public final int size()
public final T poll()
public final AbstractBoundedNodeQueue.Node<T> pollNode()