public void setFilterOr ( final Map < String , String > nameValuePairs ) { if ( nameValuePairs == null ) { throw new NullPointerException ( ) ; } if ( nameValuePairs . size ( ) < 1 ) { throw new IllegalArgumentException ( "requires at least one key" ) ; } final List < FilterSequence > filters = new ArrayList <> ( ) ; for ( final Map . Entry < String , String > entry : nameValuePairs . entrySet ( ) ) { filters . add ( new FilterSequence ( entry . getKey ( ) , entry . getValue ( ) , FilterSequence . MatchingRuleEnum . EQUALS ) ) ; } setFilterBind ( filters , "|" ) ; }
Set up an OR filter for each map key and value . Consider the following example .