/guava/guava/src/com/google/common/collect/Iterables.java
: Iterators.consumingIterator( iterable.iterator( ) ) ;Iterator<T> iterator = removeFrom.iterator( ) ;
Iterator<T> iterator = removeFrom.iterator ( ) ;
return Iterators.removeIf(removeFrom.iterator(), predicate); } @CheckForNull static <T extends @Nullable Object> T removeFirstMatching( Iterable<T> removeFrom, Predicate<? super T> predicate) { checkNotNull(predicate); <extra_id_0> while (iterator.hasNext()) { T next = iterator.next(); if (predicate.apply(next)) { iterator.remove(); return next; }