public class CheckedLinkedBlockingQueue<E> extends LinkedBlockingQueue<E>
LinkedBlockingQueue,给定一个检查函数,在加入元素前检查此函数| 构造器和说明 |
|---|
CheckedLinkedBlockingQueue(Collection<? extends E> c,
Predicate<E> checker)
构造
|
CheckedLinkedBlockingQueue(Predicate<E> checker)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
offer(E e) |
boolean |
offer(E e,
long timeout,
TimeUnit unit) |
void |
put(E e) |
clear, contains, drainTo, drainTo, iterator, peek, poll, poll, remainingCapacity, remove, size, spliterator, take, toArray, toArray, toStringadd, addAll, element, removecontainsAll, isEmpty, removeAll, retainAllclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddaddAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, streampublic CheckedLinkedBlockingQueue(Predicate<E> checker)
checker - 检查函数public CheckedLinkedBlockingQueue(Collection<? extends E> c, Predicate<E> checker)
c - 初始集合checker - 检查函数public void put(E e) throws InterruptedException
put 在接口中 BlockingQueue<E>put 在类中 LinkedBlockingQueue<E>InterruptedExceptionpublic boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException
offer 在接口中 BlockingQueue<E>offer 在类中 LinkedBlockingQueue<E>InterruptedExceptionpublic boolean offer(E e)
offer 在接口中 BlockingQueue<E>offer 在接口中 Queue<E>offer 在类中 LinkedBlockingQueue<E>Copyright © 2024. All rights reserved.