Returns a predicate that evaluates to {@code true} if its
argument satisfies all predicates {@code ps}.
2237
public static <T> Predicate<T> and(final Predicate<? super T>... ps) {
    return new Predicate<T>() {
      @Override
      public boolean apply(T obj) {
        for (Predicate<? super T> p : ps) {
          if (!p.apply(obj)) {
            return false;
          }
        }
        return true;
      }
    };
  }
1198732
public static <V> Predicate<TaskContext<V>> ifResult(Predicate<V> predicate) {
        return ctx -> predicate.test(ctx.getResult());
    }
1339370
private static <X> Predicate<X> isCandidate(final Iterable<List<X>> remainingInputs) {
        return new Predicate<X>() {

            Predicate<List<X>> headIs(final X c) {
                return new Predicate<List<X>>() {
                    public boolean apply(List<X> input) {
                        return !input.isEmpty() && c.equals(input.get(0));
                    }
                };
            }

            Predicate<List<X>> tailContains(final X c) {
                return new Predicate<List<X>>() {
                    public boolean apply(List<X> input) {
                        return input.indexOf(c) > 0;
                    }
                };
             }

             public boolean apply(final X c) {
                 return any(remainingInputs, headIs(c)) &&
                       all(remainingInputs, not(tailContains(c)));
             }
        };
    }
34439
public static AbstractServerPredicate ofKeyPredicate(final Predicate<PredicateKey> p) {
        return new AbstractServerPredicate() {
            @Override
            @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "NP")
            public boolean apply(PredicateKey input) {
                return p.apply(input);
            }            
        };        
    }
1107951
function AnyAllPredicate(op, expr, pred) {
      this.op = this._resolveOp(op);
      this.exprSource = expr;
      // this.expr will not be resolved until validate is called
      this.pred = Predicate(pred);
    }
240603
public BooleanBuilder orAllOf(Predicate... args) {
        if (args.length > 0) {
            or(ExpressionUtils.allOf(args));
        }
        return this;
    }
707170
public boolean is(MatrixPredicate predicate) {
        MatrixIterator it = iterator();
        boolean result = predicate.test(rows, columns);

        while (it.hasNext() && result) {
            double x = it.next();
            int i = it.rowIndex();
            int j = it.columnIndex();
            result = predicate.test(i, j, x);
        }

        return result;
    }
1097335
public static <T, P, R extends Collection<T>> R rejectWith(
            Iterable<T> iterable,
            Predicate2<? super T, ? super P> predicate,
            P parameter,
            R targetCollection)
    {
        if (iterable instanceof RichIterable)
        {
            return ((RichIterable<T>) iterable).rejectWith(predicate, parameter, targetCollection);
        }
        if (iterable instanceof ArrayList)
        {
            return ArrayListIterate.rejectWith(
                    (ArrayList<T>) iterable,
                    predicate,
                    parameter,
                    targetCollection);
        }
        if (iterable instanceof RandomAccess)
        {
            return RandomAccessListIterate.rejectWith((List<T>) iterable, predicate, parameter, targetCollection);
        }
        if (iterable != null)
        {
            return IterableIterate.rejectWith(iterable, predicate, parameter, targetCollection);
        }
        throw new IllegalArgumentException("Cannot perform a rejectWith on null");
    }
1329194
public static <T> Predicate<Iterable<T>> allPredicate(final Predicate<T> pred) {
    return new Predicate<Iterable<T>>() {
      @Override
      public boolean apply(final Iterable<T> iter) {
        return com.google.common.collect.Iterables.all(iter, pred);
      }
    };
  }
913402
public boolean forall(PixelPredicate predicate) {
        return Arrays.stream(points()).allMatch(p -> predicate.test(p.x, p.y, pixel(p)));
    }
136724
public boolean containsAll(Param<?>... ps) {
      List<Param<?>> paramsToCheck = Arrays.asList(ps);
      List<Param<?>> paramsCurrent = Arrays.asList(params);
      return paramsCurrent.containsAll(paramsToCheck);
   }
691782
public boolean hasAnySubexpressionWithPredicate(SubexprFinderPredicate pred) {
        if (pred.matches(this)) {
            return true;
        }

        if (m_left != null && m_left.hasAnySubexpressionWithPredicate(pred)) {
            return true;
        }

        if (m_right != null && m_right.hasAnySubexpressionWithPredicate(pred)) {
            return true;
        }

        if (m_args != null) {
            for (AbstractExpression argument : m_args) {
                if (argument.hasAnySubexpressionWithPredicate(pred)) {
                    return true;
                }
            }
        }

        return false;
    }
35971
public static <T> Predicate<T> TRUE() {
	return new Predicate<T>() {
	    public boolean check(T obj) { return true; }
	};
    }
1357073
public static <K, V> Predicate<Map<K, V>> allKeys(Predicate<? super K> p) {
    return forKeys(Predicates.<K>all(p));
  }
778665
public <T> Predicate<T> in (final Collection<? extends T> target)
    {
        return new Predicate<T>() {
            public boolean apply (T arg) {
                try {
                    return target.contains(arg);
                } catch (NullPointerException e) {
                    return false;
                } catch (ClassCastException e) {
                    return false;
                }
            }
        };
    }
329499
public Predicate<T> negate() {
        return new Predicate<T>() {
            @Override
            public boolean test( T input ) {
                return !Predicate.this.test(input);
            }

            @Override
            public Predicate<T> negate() {
                return Predicate.this;
            }
        };
    }
115176
public static <T> Predicate<T> negate(
        Predicate<? super T> p)
    {
        Objects.requireNonNull(p, "The predicate is null");
        return new Predicate<T>()
        {
            @Override
            public boolean test(T t)
            {
                return !p.test(t);
            }
            
            @Override
            public String toString()
            {
                return "!(" + p + ")";
            }
        };
    }