|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.collections.concurrent.SynchronizedCollection<T>
pivot.collections.concurrent.SynchronizedList<T>
pivot.collections.concurrent.SynchronizedQueue<T>
public class SynchronizedQueue<T>
Synchronized implementation of the Queue
interface.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pivot.collections.List |
---|
List.ListListenerList<T> |
Nested classes/interfaces inherited from interface pivot.collections.Sequence |
---|
Sequence.Search, Sequence.Sort, Sequence.Tree |
Field Summary |
---|
Fields inherited from class pivot.collections.concurrent.SynchronizedCollection |
---|
collection |
Constructor Summary | |
---|---|
SynchronizedQueue(Queue<T> queue)
|
Method Summary | |
---|---|
int |
add(T item)
Adds an item to the list. |
T |
dequeue()
Removes an item from the head of the queue, blocking if the queue is empty. |
void |
enqueue(T item)
Enqueues an item. |
void |
insert(T item,
int index)
Inserts an item into the list. |
T |
peek()
Returns the item at the head of the queue without removing it from the queue. |
Methods inherited from class pivot.collections.concurrent.SynchronizedList |
---|
clear, get, getLength, getListListeners, indexOf, remove, remove, update |
Methods inherited from class pivot.collections.concurrent.SynchronizedCollection |
---|
getComparator, iterator, setComparator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface pivot.collections.List |
---|
clear, getLength, getListListeners, remove, setComparator, update |
Methods inherited from interface pivot.collections.Sequence |
---|
get, indexOf, remove |
Methods inherited from interface pivot.collections.Collection |
---|
getComparator |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Constructor Detail |
---|
public SynchronizedQueue(Queue<T> queue)
Method Detail |
---|
public void enqueue(T item)
Queue
enqueue
in interface Queue<T>
item
- The item to add to the queue.public T dequeue()
dequeue
in interface Queue<T>
public T peek()
Queue
peek
in interface Queue<T>
public int add(T item)
List
add
in interface List<T>
add
in interface Sequence<T>
add
in class SynchronizedList<T>
item
- The item to be added to the sequence.
ListListener.itemInserted(List, int)
public void insert(T item, int index)
List
insert
in interface List<T>
insert
in interface Sequence<T>
insert
in class SynchronizedList<T>
item
- The item to be added to the list.index
- The index at which the item should be inserted. Must be a value between
0 and getLength().ListListener.itemInserted(List, int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |