code: static boolean removeAllImpl(Set<?> set, Iterator<?> iterator) {
      boolean changed = false;
      while (iterator.hasNext()) {
        changed |= set.remove(iterator.next());
      }
      return changed;
    }
docs: Remove each element in an iterable from a set.