public static < T > boolean removeAllIterable ( Iterable < ? extends T > iterable , Collection < T > targetCollection ) { if ( iterable == null ) { throw new NullPointerException ( ) ; } if ( iterable instanceof Collection < ? > ) { return targetCollection . removeAll ( ( Collection < T > ) iterable ) ; } int oldSize = targetCollection . size ( ) ; Iterate . forEachWith ( iterable , Procedures2 . < T > removeFromCollection ( ) , targetCollection ) ; return targetCollection . size ( ) != oldSize ; }
Remove all elements present in Iterable from the target collection returns true if any element was removed .