Returns a predicate that evaluates the {@code failurePredicate} against a failure.
557145
@SuppressWarnings("unchecked")
  static <R> BiPredicate<R, Throwable> failurePredicateFor(Predicate<? extends Throwable> failurePredicate) {
    return (t, u) -> u != null && ((Predicate<Throwable>) failurePredicate).test(u);
  }
554711
@Deprecated
    public static String reject(String string, CharPredicate predicate)
    {
        return StringIterate.rejectChar(string, predicate);
    }
501176
public static <T, E extends Throwable> @NonNull Predicate<T> unwrappingRethrowPredicate(final @NonNull ThrowingPredicate<T, E> predicate) {
    return input -> {
      try {
        return predicate.throwingTest(input);
      } catch(final Throwable t) {
        throw rethrow(unwrap(t));
      }
    };
  }
108038
public static Predicate<? super Throwable> statusCode(int... codes) {
        return t -> t instanceof ClientV2Exception &&
            Arrays.stream(codes).anyMatch(candidate -> ((ClientV2Exception) t).getCode().equals(candidate));
    }
1157458
public Optional<T> tryFind(Predicate<T> decision) {
		return Iterables.tryFind(result(), decision);
	}
229744
public boolean isFailure(R result, Throwable failure) {
    for (BiPredicate<R, Throwable> predicate : failureConditions) {
      try {
        if (predicate.test(result, failure))
          return true;
      } catch (Exception ignored) {
        // Ignore confused user-supplied predicates.
        // They should not be allowed to halt execution of the operation.
      }
    }

    // Fail by default if a failure is not checked by a condition
    return failure != null && !failuresChecked;
  }
450573
public static <T> Predicate<T> predicate(CheckedPredicate<T> predicate) {
        return Unchecked.predicate(predicate, Unchecked.RETHROW_ALL);
    }
965893
public static <T, E extends Exception> Predicate<T> sneaked(SneakyPredicate<T, E> predicate) {
    return t -> {
      @SuppressWarnings("unchecked")
      SneakyPredicate<T, RuntimeException> castedSneakyPredicate =
          (SneakyPredicate<T, RuntimeException>) predicate;
      return castedSneakyPredicate.test(t);
    };
  }
948284
public S handle(List<Class<? extends Throwable>> failures) {
    Assert.notNull(failures, "failures");
    Assert.isTrue(!failures.isEmpty(), "failures cannot be empty");
    failuresChecked = true;
    failureConditions.add(failurePredicateFor(failures));
    return (S) this;
  }
35971
public static <T> Predicate<T> TRUE() {
	return new Predicate<T>() {
	    public boolean check(T obj) { return true; }
	};
    }
1034930
public static <T> Predicate<T> predicate(Function<T, Boolean> function) {
        dbc.precondition(function != null, "cannot adapt a null function");
        return function::apply;
    }
1262389
public RetryerBuilder<V> retryIfResult(@Nonnull Predicate<V> resultPredicate) {
        Preconditions.checkNotNull(resultPredicate, "resultPredicate may not be null");
        rejectionPredicate = Predicates.or(rejectionPredicate, new ResultPredicate<V>(resultPredicate));
        return this;
    }
908566
public Retryer<R> retryIfResult(final Predicate<R> decision) {
        rejection = or(rejection, new Predicate<Tried<R>>() {

            @Override public boolean apply(Tried<R> input) {
                return input.hasResult() ? decision.apply(input.getResult()) : false;
            }
        });
        
        return this;
    }
1158481
public static <T> Function<T, Boolean> forPredicate (final Predicate<T> predicate)
    {
        return new Function<T, Boolean>() {
            public Boolean apply (T arg) {
                return predicate.apply(arg);
            }
        };
    }
1328043
public static <T> Predicate<T> notNull() {
        return new Predicate<T>() {
            @Override
            public boolean test(T testValue) {
                return testValue != null;
            }
        };
    }
338212
public static <T extends Comparable<? super T>> Predicates<T> betweenInclusiveFrom(T from, T to)
    {
        Predicates.failIfDifferentTypes(from, to);
        return new BetweenInclusiveFrom<T>(from, to);
    }
982070
public java.util.List<Failure> getFailures() {
        if (failures == null) {
            failures = new com.amazonaws.internal.SdkInternalList<Failure>();
        }
        return failures;
    }