consumingIterable

Returns a view of the supplied iterable that wraps each generated Iterator through Iterators.consumingIterator.

Note: If this is a Queue, the returned iterable will get entries from Queue.remove since Queue's iteration order is undefined. Calling Iterator.hasNext on a generated iterator from the returned iterable may cause an item to be immediately dequeued for return on a subsequent call to Iterator.next.

Return

a view of the supplied iterable that wraps each generated iterator through Iterators.consumingIterator(iterator); for queues, an iterable that generates iterators that return and consume the queue's elements in queue order

See also