public static < T > boolean rejectAtLeastOnce ( final T object , final List < Filter < T > > filters ) { // Check sanity Validate . notNull ( filters , "filters" ) ; boolean rejectedByAtLeastOneFilter = false ; for ( Filter < T > current : filters ) { if ( ! current . accept ( object ) ) { rejectedByAtLeastOneFilter = true ; break ; } } // All done. return rejectedByAtLeastOneFilter ; }
Algorithms for rejecting the supplied object if at least one of the supplied Filters does not accept it .