org.apache.commons.collections.functors
Class NotPredicate
java.lang.Object
org.apache.commons.collections.functors.NotPredicate
- Predicate, PredicateDecorator, Serializable
public final class NotPredicate
extends java.lang.Object
Predicate implementation that returns the opposite of the decorated predicate.
$Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $
NotPredicate
public NotPredicate(Predicate predicate)
Constructor that performs no validation.
Use getInstance
if you want that.
predicate
- the predicate to call after the null check
evaluate
public boolean evaluate(Object object)
Evaluates the predicate returning the opposite to the stored predicate.
- evaluate in interface Predicate
object
- the input object
- true if predicate returns false
getInstance
public static Predicate getInstance(Predicate predicate)
Factory to create the not predicate.
predicate
- the predicate to decorate, not null
Copyright © 2001-2015 Apache Software Foundation. All Rights Reserved.