E - the type of the elements in the collectionpublic class SynchronizedQueue<E> extends SynchronizedCollection<E> implements java.util.Queue<E>
Queue to synchronize its behaviour for a multi-threaded environment.
 Methods are synchronized, then forwarded to the decorated queue. Iterators must be separately synchronized around the loop.
| Modifier and Type | Method and Description | 
|---|---|
E | 
element()  | 
boolean | 
equals(java.lang.Object object)  | 
int | 
hashCode()  | 
boolean | 
offer(E e)  | 
E | 
peek()  | 
E | 
poll()  | 
E | 
remove()  | 
static <E> SynchronizedQueue<E> | 
synchronizedQueue(java.util.Queue<E> queue)
Factory method to create a synchronized queue. 
 | 
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, removeIf, retainAll, size, synchronizedCollection, toArray, toArray, toStringpublic static <E> SynchronizedQueue<E> synchronizedQueue(java.util.Queue<E> queue)
E - the type of the elements in the queuequeue - the queue to decorate, must not be nulljava.lang.NullPointerException - if queue is nullpublic boolean equals(java.lang.Object object)
equals in interface java.util.Collection<E>equals in class SynchronizedCollection<E>public int hashCode()
hashCode in interface java.util.Collection<E>hashCode in class SynchronizedCollection<E>Copyright © 2010 - 2023 Adobe. All Rights Reserved