net.sf.molae.pipe.filter
Class KeyFilter
java.lang.Object
|
+--net.sf.molae.pipe.basic.ObjectProxy
|
+--net.sf.molae.pipe.filter.KeyFilter
- All Implemented Interfaces:
- Predicate
- public final class KeyFilter
- extends ObjectProxy
- implements Predicate
Applies the given filter to the key of map entries.
- See Also:
KeyFilteredMap
|
Method Summary |
boolean |
evaluate(Object input)
Applies the underlying filter to the key of the specified map entry. |
KeyFilter
public KeyFilter(Predicate filter)
- Constructs a KeyFilter object.
- Parameters:
filter - The filter to apply to the keys.- Throws:
NullPointerException - if the specified object is
null.
evaluate
public boolean evaluate(Object input)
- Applies the underlying filter to the key of the specified map entry.
- Specified by:
evaluate in interface Predicate
- Parameters:
input - the map entry to evaluate.- Returns:
true, iff the specified object is a
Map.Entry and its key fulfils the condition of the
filter associated with this object.