|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.pool.Queue<T>
T - type of object in the queuepublic class Queue<T>
Provides a wrapper around a Deque to support LIFO and FIFO
operations.
| Constructor Summary | |
|---|---|
Queue(QueueType type)
Creates a new queue. |
|
| Method Summary | |
|---|---|
void |
add(T t)
Adds an object to the queue based on the queue type. |
boolean |
contains(T t)
Returns whether t is in the queue. |
T |
element()
Retrieves, but does not remove, the first element in the queue. |
boolean |
isEmpty()
Returns whether or not the queue is empty. |
Iterator<T> |
iterator()
|
T |
remove()
Removes the first element in the queue. |
boolean |
remove(T t)
Removes the supplied element from the queue. |
int |
size()
Returns the number of elements in the queue. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Queue(QueueType type)
type - how will objects be inserted into the queue| Method Detail |
|---|
public void add(T t)
Deque.offerFirst(Object) and Deque.offerLast(Object).
t - to addpublic T remove()
Deque.removeFirst().
public boolean remove(T t)
Deque.remove(Object).
t - to remove
public T element()
Deque.getFirst().
public boolean contains(T t)
Deque.contains(Object).
t - that may be in the queue
public boolean isEmpty()
Collection.isEmpty()}.
public int size()
Deque.size().
public Iterator<T> iterator()
iterator in interface Iterable<T>public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||