FileDocCategorySizeDatePackage
Predicates.javaAPI DocAndroid 1.5 API4451Wed May 06 22:41:56 BST 2009com.android.internal.util

Predicates

public class Predicates extends Object
Predicates contains static methods for creating the standard set of {@code Predicate} objects.

Fields Summary
Constructors Summary
private Predicates()

    
Methods Summary
public static Predicateand(Predicate components)
Returns a Predicate that evaluates to true iff each of its components evaluates to true. The components are evaluated in order, and evaluation will be "short-circuited" as soon as the answer is determined.

        return and(Arrays.asList(components));
    
public static Predicateand(java.lang.Iterable components)
Returns a Predicate that evaluates to true iff each of its components evaluates to true. The components are evaluated in order, and evaluation will be "short-circuited" as soon as the answer is determined. Does not defensively copy the iterable passed in, so future changes to it will alter the behavior of this Predicate. If components is empty, the returned Predicate will always evaluate to true.

        return new AndPredicate(components);
    
public static Predicatenot(Predicate predicate)
Returns a Predicate that evaluates to true iff the given Predicate evaluates to false.

        return new NotPredicate<T>(predicate);
    
public static Predicateor(Predicate components)
Returns a Predicate that evaluates to true iff any one of its components evaluates to true. The components are evaluated in order, and evaluation will be "short-circuited" as soon as the answer is determined.

        return or(Arrays.asList(components));
    
public static Predicateor(java.lang.Iterable components)
Returns a Predicate that evaluates to true iff any one of its components evaluates to true. The components are evaluated in order, and evaluation will be "short-circuited" as soon as the answer is determined. Does not defensively copy the iterable passed in, so future changes to it will alter the behavior of this Predicate. If components is empty, the returned Predicate will always evaluate to false.

        return new OrPredicate(components);