android/guava/src/com/google/common/collect/Iterators.java
@CanIgnoreReturnValue
  public static boolean removeAll(Iterator<?> removeFrom, Collection<?> elementsToRemove) {
    checkNotNull(elementsToRemove);
    boolean result = false;
    while (removeFrom.hasNext()) {
      if (elementsToRemove.contains(removeFrom.next())) {
        removeFrom.remove();
        result = true;
      }
    }
    return result;
  }
@CanIgnoreReturnValue
  public static boolean removeAll(Iterator<?> removeFrom, Collection<?> elementsToRemove) {
    checkNotNull(elementsToRemove);
    boolean result = false;
    while (removeFrom.hasNext()) {
      if (elementsToRemove.contains(removeFrom.next())) {
        removeFrom.remove();
        result = true;
      }
    }
    return result;
  }
@ CanIgnoreReturnValue public static boolean removeAll ( Iterator < ? > removeFrom , Collection < ? > elementsToRemove ) { checkNotNull ( elementsToRemove ) ; boolean result = false ; while ( removeFrom . hasNext ( ) ) { if ( elementsToRemove . contains ( removeFrom . next ( ) ) ) { removeFrom . remove ( ) ; result = true ; } } return result ; }
Traverses an iterator and removes every element that belongs to the provided collection. The
iterator will be left exhausted: its {@code hasNext()} method will return {@code false}.

@param removeFrom the iterator to (potentially) remove elements from
@param elementsToRemove the elements to remove
@return {@code true} if any element was removed from {@code iterator}
Traverses an iterator and removes every element that belongs to the provided collection . The iterator will be left exhausted : its { @code hasNext () } method will return { @code false } .