从指定的队列中移除所有可用的元素,并将它们添加到给定的集合中。 不删除唯一标记 @param c 集合 @param maxElements 最大元素数 @return
(Collection<? super T> c, int maxElements)
| 104 | * @return |
| 105 | */ |
| 106 | public int drainTo2(Collection<? super T> c, int maxElements) { |
| 107 | int numberOfElements = mBlockingQueue.drainTo(c, maxElements); |
| 108 | return numberOfElements; |
| 109 | } |
| 110 | |
| 111 | @Override |
| 112 | public Iterator<T> iterator() { |