public class WrappingPriorityQueue<T,K extends T> extends ForwardingBlockingQueue<T>
| Constructor and Description |
|---|
WrappingPriorityQueue(PriorityBlockingQueue<K> delegate,
Function<T,K> wrapFunction,
Function<K,T> unwrapFunction) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T e) |
boolean |
addAll(Collection<? extends T> collection) |
boolean |
addAllBypass(Collection<K> collection)
Allows to add a set of elements that are already
wrapped.
|
PriorityBlockingQueue<T> |
delegate() |
int |
drainTo(Collection<? super T> c) |
int |
drainTo(Collection<? super T> c,
int maxElements) |
T |
element() |
Iterator<T> |
iterator() |
boolean |
offer(T e) |
boolean |
offer(T e,
long timeout,
TimeUnit unit) |
T |
peek() |
T |
poll() |
T |
poll(long timeout,
TimeUnit unit) |
void |
put(T e) |
T |
remove() |
T |
take() |
Iterable<T> |
unwrap()
Returns an iterable with the unwrapped elements.
|
Iterable<K> |
wrapped()
Returns an iterable with the wrapped elements.
|
remainingCapacity
standardOffer, standardPeek, standardPoll
clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContains, standardContainsAll, standardIsEmpty, standardRemove, standardRemoveAll, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArray
toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
contains, remove
clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
public PriorityBlockingQueue<T> delegate()
delegate in class ForwardingBlockingQueue<T>
public boolean addAllBypass(Collection<K> collection)
public boolean add(T e)
add in interface Collection<T>
add in interface BlockingQueue<T>
add in interface Queue<T>
add in class ForwardingCollection<T>
public boolean offer(T e)
offer in interface BlockingQueue<T>
offer in interface Queue<T>
offer in class ForwardingQueue<T>
public T peek()
public T poll()
public void put(T e)
put in interface BlockingQueue<T>
put in class ForwardingBlockingQueue<T>
public T take() throws InterruptedException
take in interface BlockingQueue<T>
take in class ForwardingBlockingQueue<T>
InterruptedExceptionpublic boolean offer(T e, long timeout, TimeUnit unit) throws InterruptedException
offer in interface BlockingQueue<T>
offer in class ForwardingBlockingQueue<T>
InterruptedExceptionpublic int drainTo(Collection<? super T> c)
drainTo in interface BlockingQueue<T>
drainTo in class ForwardingBlockingQueue<T>
public int drainTo(Collection<? super T> c, int maxElements)
drainTo in interface BlockingQueue<T>
drainTo in class ForwardingBlockingQueue<T>
public T poll(long timeout, TimeUnit unit) throws InterruptedException
poll in interface BlockingQueue<T>
poll in class ForwardingBlockingQueue<T>
InterruptedExceptionpublic boolean addAll(Collection<? extends T> collection)
addAll in interface Collection<T>
addAll in class ForwardingCollection<T>
public Iterator<T> iterator()
iterator in interface Iterable<T>
iterator in interface Collection<T>
iterator in class ForwardingCollection<T>
public T element()
Copyright © 2010–2025 The DAISY Consortium. All rights reserved.