|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.collections.functors.NotPredicate<T>
public final class NotPredicate<T>
Predicate implementation that returns the opposite of the decorated predicate.
Constructor Summary | |
---|---|
NotPredicate(Predicate<T> predicate)
Constructor that performs no validation. |
Method Summary | ||
---|---|---|
boolean |
evaluate(T object)
Evaluates the predicate returning the opposite to the stored predicate. |
|
static
|
getInstance(Predicate<T> predicate)
Factory to create the not predicate. |
|
Predicate<? super T>[] |
getPredicates()
Gets the predicate being decorated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NotPredicate(Predicate<T> predicate)
getInstance
if you want that.
predicate
- the predicate to call after the null checkMethod Detail |
---|
public static <T> Predicate<T> getInstance(Predicate<T> predicate)
predicate
- the predicate to decorate, not null
IllegalArgumentException
- if the predicate is nullpublic boolean evaluate(T object)
evaluate
in interface Predicate<T>
object
- the input object
public Predicate<? super T>[] getPredicates()
getPredicates
in interface PredicateDecorator<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |