| Modifier and Type | Method and Description |
|---|---|
default <INITIAL_INPUT> |
after(@Nonnull FailableUnaryFunction<? super INITIAL_INPUT,? extends INPUT,? extends EXCEPTION> function)
Returns the composition of the given function followed by this predicate.
|
default @Nonnull FailablePredicate<INPUT,EXCEPTION> |
and(@Nonnull FailablePredicate<? super INPUT,? extends EXCEPTION> predicate)
Returns the conjunction of this predicate with the given predicate.
|
static <INPUT,EXCEPTION extends Exception> |
and(@Nonnull FiniteIterable<? extends FailablePredicate<? super INPUT,? extends EXCEPTION>> predicates)
Returns the conjunction of the given predicates.
|
default @Nonnull FailableUnaryFunction<INPUT,Boolean,EXCEPTION> |
asFunction()
Returns this predicate as a unary function.
|
static <INPUT,INTERMEDIATE,EXCEPTION extends Exception> |
compose(@Nonnull FailableUnaryFunction<? super INPUT,? extends INTERMEDIATE,? extends EXCEPTION> function,
@Nonnull FailablePredicate<? super INTERMEDIATE,? extends EXCEPTION> predicate)
Returns the composition of the given function and predicate with a flexible exception type.
|
boolean |
evaluate(INPUT input)
Evaluates whether the given input satisfies this predicate.
|
default @Nonnull FailablePredicate<INPUT,EXCEPTION> |
negate()
Returns the negation of this predicate.
|
static <INPUT,EXCEPTION extends Exception> |
or(FailablePredicate<? super INPUT,? extends EXCEPTION>... predicates)
Returns the disjunction of the given predicates.
|
default @Nonnull FailablePredicate<INPUT,EXCEPTION> |
or(@Nonnull FailablePredicate<? super INPUT,? extends EXCEPTION> predicate)
Returns the disjunction of this predicate with the given predicate.
|
static <INPUT,EXCEPTION extends Exception> |
or(@Nonnull FiniteIterable<? extends FailablePredicate<? super INPUT,? extends EXCEPTION>> predicates)
Returns the disjunction of the given predicates.
|
default @Nonnull FailablePredicate<INPUT,EXCEPTION> |
replaceNull(boolean defaultValue)
Returns a new predicate based on this predicate that returns the given default value for null.
|
default @Nonnull Predicate<INPUT> |
suppressExceptions()
Returns a predicate that suppresses the exceptions of this predicate and returns false instead.
|
default @Nonnull Predicate<INPUT> |
suppressExceptions(boolean defaultOutput)
Returns a predicate that suppresses the exceptions of this predicate and returns the given default output instead.
|
default @Nonnull Predicate<INPUT> |
suppressExceptions(@Nonnull Consumer<? super Exception> handler)
Returns a predicate that catches the exceptions of this predicate, passes them to the given exception handler and returns false instead.
|
default @Nonnull Predicate<INPUT> |
suppressExceptions(@Nonnull Consumer<? super Exception> handler,
boolean defaultOutput)
Returns a predicate that catches the exceptions of this predicate, passes them to the given exception handler and returns the given default output instead.
|
@Pure
boolean evaluate(@NonCaptured @Unmodified
INPUT input)
throws EXCEPTION extends Exception
@Pure @Nonnull default @Nonnull Predicate<INPUT> suppressExceptions(@Captured @Nonnull @Nonnull Consumer<? super Exception> handler, boolean defaultOutput)
@Pure @Nonnull default @Nonnull Predicate<INPUT> suppressExceptions(@Captured @Nonnull @Nonnull Consumer<? super Exception> handler)
@Pure @Nonnull default @Nonnull Predicate<INPUT> suppressExceptions(boolean defaultOutput)
@Pure @Nonnull default @Nonnull Predicate<INPUT> suppressExceptions()
@Pure @Nonnull default @Nonnull FailablePredicate<INPUT,EXCEPTION> and(@Nonnull @Nonnull FailablePredicate<? super INPUT,? extends EXCEPTION> predicate)
@Pure @Nonnull static <INPUT,EXCEPTION extends Exception> @Nonnull FailablePredicate<INPUT,EXCEPTION> and(@Nonnull @Nonnull FiniteIterable<? extends FailablePredicate<? super INPUT,? extends EXCEPTION>> predicates)
@Pure @Nonnull default @Nonnull FailablePredicate<INPUT,EXCEPTION> or(@Nonnull @Nonnull FailablePredicate<? super INPUT,? extends EXCEPTION> predicate)
@Pure @SafeVarargs @Nonnull static <INPUT,EXCEPTION extends Exception> @Nonnull FailablePredicate<INPUT,EXCEPTION> or(@Nonnull @NonNullableElements FailablePredicate<? super INPUT,? extends EXCEPTION>... predicates)
@Pure @Nonnull static <INPUT,EXCEPTION extends Exception> @Nonnull FailablePredicate<INPUT,EXCEPTION> or(@Nonnull @Nonnull FiniteIterable<? extends FailablePredicate<? super INPUT,? extends EXCEPTION>> predicates)
@Pure @Nonnull default @Nonnull FailablePredicate<INPUT,EXCEPTION> negate()
@Pure @Nonnull static <INPUT,INTERMEDIATE,EXCEPTION extends Exception> @Nonnull FailablePredicate<INPUT,EXCEPTION> compose(@Nonnull @Nonnull FailableUnaryFunction<? super INPUT,? extends INTERMEDIATE,? extends EXCEPTION> function, @Nonnull @Nonnull FailablePredicate<? super INTERMEDIATE,? extends EXCEPTION> predicate)
@Pure @Nonnull default <INITIAL_INPUT> @Nonnull FailablePredicate<INITIAL_INPUT,EXCEPTION> after(@Nonnull @Nonnull FailableUnaryFunction<? super INITIAL_INPUT,? extends INPUT,? extends EXCEPTION> function)
@Pure @Nonnull default @Nonnull FailableUnaryFunction<INPUT,Boolean,EXCEPTION> asFunction()
@Pure @Nonnull default @Nonnull FailablePredicate<INPUT,EXCEPTION> replaceNull(boolean defaultValue)
Copyright © 2017. All rights reserved.