Return a predicate that is always satisfied.

@return the predicate; never null
773629
public static <T> Predicate<T> always() {
        return new Predicate<T>() {
            @Override
            public boolean test( T input ) {
                return true;
            }
        };
    }
640857
public static Constraint truthy() {
		return new Constraint("true", simplePayload("true")) {
			public boolean isValid(Object actualValue) {
				if (actualValue != null) {
					if ((actualValue instanceof Boolean && !((Boolean) actualValue))
							|| (actualValue instanceof String && !Boolean.parseBoolean((String) actualValue))) {
						return false;
					}
				}
				return true;
			}
		};
	}
1198732
public static <V> Predicate<TaskContext<V>> ifResult(Predicate<V> predicate) {
        return ctx -> predicate.test(ctx.getResult());
    }
996895
public static <T> Predicate<T> constant(final boolean b) {
    return b
        ? Predicates.<Object, T>narrow(TRUE)
        : Predicates.<Object, T>narrow(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;
            }
        };
    }
1079175
public static <T> Collector<T, ?, Boolean> noneMatch(Predicate<? super T> predicate) {
        return allMatch(predicate.negate());
    }
67149
public static <T> Predicate<T> predicate(CheckedPredicate<T> predicate) {
        return predicate(predicate, THROWABLE_TO_RUNTIME_EXCEPTION);
    }
1162810
@SuppressWarnings("unchecked")
    public Set<QueryableEntry> query(Predicate predicate) {
        stats.incrementQueryCount();

        if (!haveAtLeastOneIndex() || !(predicate instanceof IndexAwarePredicate)) {
            return null;
        }

        IndexAwarePredicate indexAwarePredicate = (IndexAwarePredicate) predicate;
        QueryContext queryContext = queryContextProvider.obtainContextFor(this);
        if (!indexAwarePredicate.isIndexed(queryContext)) {
            return null;
        }

        Set<QueryableEntry> result = indexAwarePredicate.filter(queryContext);
        if (result != null) {
            stats.incrementIndexedQueryCount();
            queryContext.applyPerQueryStats();
        }

        return result;
    }
307756
public static <T> ActionPredicate<T> fromPredicate(final Predicate<T> predicate) {
	return new ActionPredicate<T>() {
	    public boolean actionPredicate(T obj) {
		return predicate.check(obj);
	    }
	};
    }
98236
function getPredicateFunction(predicate) {
    let fn = predicate;
    if (_.isString(predicate)) {
        fn = node => (_.isFunction(node[predicate]) ? node[predicate]() : node[predicate]);
    }

    return fn;
}
1278921
public static <T> Predicate<T> and(Predicate<T>... predicates) {
        dbc.precondition(predicates != null, "predicates is null");
        return Logic.Unary.and(Iterations.iterable(predicates));
    }
1098957
public static <T, U> BiPredicate<T, U> biPredicate(CheckedBiPredicate<T, U> predicate) {
        return Unchecked.biPredicate(predicate, Unchecked.RETHROW_ALL);
    }
723889
public Criteria is(@Nullable Object o) {
		if (o == null) {
			return isNull();
		}
		predicates.add(new Predicate(OperationKey.EQUALS, o));
		return this;
	}
118380
public Rule CriteriaOnlyFindQuery() {
		return Sequence( !peek().isCliQuery(), JsonParameter( JsonObject() ) , peek().setOperation( Operation.FIND ), peek().setCriteria( match() ) );
	}
189704
def any(self, predicate):
        
        if predicate is None:
            raise NullArgumentError(
                u"predicate lambda expression is necessary")
        return self.where(predicate).count() > 0
1315414
public synchronized ArrayList<LinkedHashMap.Entry<K, V>> getMatchingEntries(
      @Nullable Predicate<K> predicate) {
    ArrayList<LinkedHashMap.Entry<K, V>> matchingEntries = new ArrayList<>(mMap.entrySet().size());
    for (LinkedHashMap.Entry<K, V> entry : mMap.entrySet()) {
      if (predicate == null || predicate.apply(entry.getKey())) {
        matchingEntries.add(entry);
      }
    }
    return matchingEntries;
  }
1124302
@NotNull
    public OptionalDouble filter(@NotNull DoublePredicate predicate) {
        if (!isPresent()) return this;
        return predicate.test(value) ? this : OptionalDouble.empty();
    }