public class WrappingPriorityQueue<T,K extends T>
extends com.google.common.util.concurrent.ForwardingBlockingQueue<T>
Constructor and Description |
---|
WrappingPriorityQueue(PriorityBlockingQueue<K> delegate,
com.google.common.base.Function<T,K> wrapFunction,
com.google.common.base.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
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 com.google.common.util.concurrent.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 com.google.common.collect.ForwardingCollection<T>
public boolean offer(T e)
public T peek()
public T poll()
public void put(T e)
put
in interface BlockingQueue<T>
put
in class com.google.common.util.concurrent.ForwardingBlockingQueue<T>
public T take() throws InterruptedException
take
in interface BlockingQueue<T>
take
in class com.google.common.util.concurrent.ForwardingBlockingQueue<T>
InterruptedException
public boolean offer(T e, long timeout, TimeUnit unit) throws InterruptedException
offer
in interface BlockingQueue<T>
offer
in class com.google.common.util.concurrent.ForwardingBlockingQueue<T>
InterruptedException
public int drainTo(Collection<? super T> c)
drainTo
in interface BlockingQueue<T>
drainTo
in class com.google.common.util.concurrent.ForwardingBlockingQueue<T>
public int drainTo(Collection<? super T> c, int maxElements)
drainTo
in interface BlockingQueue<T>
drainTo
in class com.google.common.util.concurrent.ForwardingBlockingQueue<T>
public T poll(long timeout, TimeUnit unit) throws InterruptedException
poll
in interface BlockingQueue<T>
poll
in class com.google.common.util.concurrent.ForwardingBlockingQueue<T>
InterruptedException
public boolean addAll(Collection<? extends T> collection)
addAll
in interface Collection<T>
addAll
in class com.google.common.collect.ForwardingCollection<T>
public T element()
Copyright © 2010–2024 The DAISY Consortium. All rights reserved.