org.jjoost.util.filters
Class FilterNot<E>

java.lang.Object
  extended by org.jjoost.util.filters.FilterNot<E>
All Implemented Interfaces:
java.io.Serializable, Filter<E>

public class FilterNot<E>
extends java.lang.Object
implements Filter<E>

A that negates/inverts the result of the supplied filter

Author:
b.elliottsmith
See Also:
Serialized Form

Constructor Summary
FilterNot(Filter<E> negate)
          Construct a new filter which negates the results of the filter provided
 
Method Summary
 boolean accept(E test)
          Returns true if the Filter accepts the parameter and false otherwise
static
<E> FilterNot<E>
get(Filter<E> negate)
          Returns the negation of the supplied filter
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterNot

public FilterNot(Filter<E> negate)
Construct a new filter which negates the results of the filter provided

Parameters:
negate - filter to negate
Method Detail

accept

public boolean accept(E test)
Description copied from interface: Filter
Returns true if the Filter accepts the parameter and false otherwise

Specified by:
accept in interface Filter<E>
Parameters:
test - value to test
Returns:
true if the filter accepts test; false otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

get

public static <E> FilterNot<E> get(Filter<E> negate)
Returns the negation of the supplied filter

Parameters:
negate - filter to negate
Returns:
negation of the supplied filter