|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.common.base.Predicates
public final class Predicates
Predicates contains static methods for creating the standard set of
Predicate objects.
"Lispy, but good."
TODO: considering having these implement a VisitablePredicate
interface which specifies an accept(PredicateVisitor) method.
| Method Summary | ||
|---|---|---|
static
|
alwaysFalse()
Returns a Predicate that always evaluates to false. |
|
static
|
alwaysTrue()
Returns a Predicate that always evaluates to true. |
|
static
|
and(Iterable<? extends Predicate<? super T>> components)
Returns a Predicate that evaluates to true iff each of its components evaluates to true. |
|
static
|
and(Predicate<? super T>... components)
Returns a Predicate that evaluates to true iff each of its components evaluates to true. |
|
static
|
isEqualTo(T target)
Returns a Predicate that evaluates to true iff the object being tested equals() the given target or if both are null. |
|
static
|
isNull()
Returns a Predicate that evaluates to true if the object reference being tested is null. |
|
static
|
not(Predicate<? super T> predicate)
Returns a Predicate that evaluates to true iff the given Predicate evaluates to false. |
|
static
|
or(Iterable<? extends Predicate<? super T>> components)
Returns a Predicate that evaluates to true iff any one of its components evaluates to true. |
|
static
|
or(Predicate<? super T>... components)
Returns a Predicate that evaluates to true iff any one of its components evaluates to true. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> Predicate<T> alwaysTrue()
public static <T> Predicate<T> alwaysFalse()
public static <T> Predicate<T> isNull()
public static <T> Predicate<T> not(Predicate<? super T> predicate)
public static <T> Predicate<T> and(Iterable<? extends Predicate<? super T>> components)
public static <T> Predicate<T> and(Predicate<? super T>... components)
public static <T> Predicate<T> or(Iterable<? extends Predicate<? super T>> components)
public static <T> Predicate<T> or(Predicate<? super T>... components)
public static <T> Predicate<T> isEqualTo(@Nullable
T target)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||