net.sf.molae.pipe.filter
Class ContainmentFilter
java.lang.Object
net.sf.molae.pipe.filter.ContainmentFilter
- All Implemented Interfaces:
- TypedPredicate<Object>
public final class ContainmentFilter
- extends Object
- implements TypedPredicate<Object>
Checks for containment in a collection.
- Since:
- 2.0
|
Method Summary |
boolean |
evaluate(Object input)
Checks if the specified value is contained in the base collection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContainmentFilter
public ContainmentFilter(Collection<?> base)
- Constructs a KeyFilter object.
- Parameters:
base - The collection to be checked for containment.
- Throws:
NullPointerException - if the specified object is
null.
evaluate
public boolean evaluate(Object input)
- Checks if the specified value is contained in the base collection.
- Specified by:
evaluate in interface TypedPredicate<Object>
- Parameters:
input - a value
- Returns:
true, iff the specified object is
contained in the base collection.