public static < E > void removeMatcing ( Collection < E > collection , Matcher < ? super E > matcher ) { Iterator < E > iter = collection . iterator ( ) ; while ( iter . hasNext ( ) ) { E item = iter . next ( ) ; if ( matcher . matches ( item ) ) iter . remove ( ) ; } }
Removes matching elements from the supplied Collection .