public static < T > Filter < T > not ( final Filter < T > filter ) { return new AbstractFilter < T > ( ) { @ Override public boolean apply ( final T x ) { return ! filter . apply ( x ) ; } @ Override public String toString ( ) { return "(not " + filter + ")" ; } @ Override public Filter < T > copy ( ) { return not ( filter . copy ( ) ) ; } } ; }
Produces the negation of the given filter .