private boolean bulkRemove ( Predicate < ? super E > filter ) { boolean removed = false ; for ( Node < E > p = first ( ) , succ ; p != null ; p = succ ) { succ = succ ( p ) ; final E item ; if ( ( item = p . item ) != null && filter . test ( item ) && ITEM . compareAndSet ( p , item , null ) ) { unlink ( p ) ; removed = true ; } } return removed ; }
Implementation of bulk remove methods .