Removes, from an iterable, every element that belongs to the provided collection. This method calls Collection#removeAll if iterable is a collection, and Iterators#removeAll otherwise. @param removeFrom the iterable to (potentially) remove elements from @param elementsTo
(Iterable<?> removeFrom, Collection<?> elementsToRemove)
| 135 | * @return {@code true} if any element was removed from {@code iterable} |
| 136 | */ |
| 137 | @CanIgnoreReturnValue |
| 138 | public static boolean removeAll(Iterable<?> removeFrom, Collection<?> elementsToRemove) { |
| 139 | return (removeFrom instanceof Collection) |
| 140 | ? ((Collection<?>) removeFrom).removeAll(checkNotNull(elementsToRemove)) |
| 141 | : Iterators.removeAll(removeFrom.iterator(), elementsToRemove); |
| 142 | } |
| 143 | |
| 144 | /** |
| 145 | * Removes, from an iterable, every element that does not belong to the |
nothing calls this directly
no test coverage detected