Constructs an empty {@link ICallback.CallbackOption}, with {@link Priority#NORMAL} priority and the specified
{@link ICallbackPredicate}.

@param <P> the generic type
@param predicate the predicate
@return the callback option
437835
public static <P extends ICallbackPredicate> CallbackOption<P> of(P predicate)
		{
			return new CallbackOption<>(checkNotNull(predicate), Priority.NORMAL);
		}
1172300
public static <T> Predicate<T> monitor(Predicate<T> predicate, AtomicLong calls) {
        return new MonitoringPredicate<T>(predicate, calls);
    }
1328043
public static <T> Predicate<T> notNull() {
        return new Predicate<T>() {
            @Override
            public boolean test(T testValue) {
                return testValue != null;
            }
        };
    }
1094598
public static <T> AsyncCallback<T> before (AsyncCallback<T> target,
                                               final Function<T, Void> preOp)
    {
        return new ChainedCallback<T, T>(target) {
            @Override public void onSuccess (T result) {
                preOp.apply(result);
                forwardSuccess(result);
            }
        };
    }
253665
public static Parser<Void> isChar(final CharPredicate predicate) {
    return new Parser<Void>() {
      final String name = predicate.toString();

      @Override boolean apply(ParseContext ctxt) {
        if (ctxt.isEof()) {
          ctxt.missing(name);
          return false;
        }
        char c = ctxt.peekChar();
        if (predicate.isChar(c)) {
          ctxt.next();
          ctxt.result = null;
          return true;
        }
        ctxt.missing(name);
        return false;
      }

      @Override public String toString() {
        return name;
      }
    };
  }
58222
public ItemFilter<Model, Item> withFilterPredicate(IItemAdapter.Predicate<Item> filterPredicate) {
        this.mFilterPredicate = filterPredicate;
        return this;
    }
891457
public LoadBalancerFilter where(Predicate<LoadBalancerMetadata> predicate) {
        checkNotNull(predicate, "Predicate must be not a null");

        this.predicate = this.predicate.and(predicate);

        return this;
    }
1039946
public static <T, U> BiPredicate<T, U> biPredicate(CheckedBiPredicate<T, U> predicate, Consumer<Throwable> handler) {
        return (t, u) -> {
            try {
                return predicate.test(t, u);
            }
            catch (Throwable e) {
                handler.accept(e);

                throw new IllegalStateException("Exception handler must throw a RuntimeException", e);
            }
        };
    }
701771
@CheckReturnValue
  public final FluentIterable<E> filter(Predicate<? super E> predicate) {
    return from(Iterables.filter(iterable, predicate));
  }
858906
@CheckReturnValue
    public FluentGenerator<T> filter(@Nonnull Predicate<T> predicate) {
        return from(new FilteringGenerator<>(delegate, checkNotNull(predicate)));
    }
192589
public S handleIf(Predicate<? extends Throwable> failurePredicate) {
    Assert.notNull(failurePredicate, "failurePredicate");
    failuresChecked = true;
    failureConditions.add(failurePredicateFor(failurePredicate));
    return (S) this;
  }
1208760
@Beta
    public static <T> Predicate<T> sp(final Object mutex, final Predicate<T> predicate) {
        N.checkArgNotNull(mutex, "mutex");
        N.checkArgNotNull(predicate, "predicate");

        return new Predicate<T>() {
            @Override
            public boolean test(T t) {
                synchronized (mutex) {
                    return predicate.test(t);
                }
            }
        };
    }
186737
public RetryPolicy<R> abortOn(Predicate<? extends Throwable> failurePredicate) {
    Assert.notNull(failurePredicate, "failurePredicate");
    abortConditions.add(failurePredicateFor(failurePredicate));
    return this;
  }
1231902
public static <T> Predicate<Iterable<T>> all(
      final Predicate<? super T> p) {
    return new Predicate<Iterable<T>>() {
      @Override
      public boolean apply(Iterable<T> obj) {
        return Iterables.all(obj, p);
      }
    };
  }
971834
public <T> Predicate<T> beNull(Class<T> type) {
    return create(Objects::isNull);
  }
1051631
@SuppressWarnings("unchecked")
  public RetryPolicy<R> abortIf(BiPredicate<R, ? extends Throwable> completionPredicate) {
    Assert.notNull(completionPredicate, "completionPredicate");
    abortConditions.add((BiPredicate<R, Throwable>) completionPredicate);
    return this;
  }
264830
public TemplateFilter where(Predicate<TemplateMetadata> predicate) {
        checkNotNull(predicate, "Predicate must be not a null");

        this.predicate = this.predicate.and(predicate);

        return this;
    }