@Immutable @Functional public interface Predicate<INPUT> extends FailablePredicate<INPUT,RuntimeException>
INPUT satisfies a condition.| Modifier and Type | Field and Description |
|---|---|
static @Nonnull Predicate<Object> |
ALWAYS_FALSE
Stores a predicate which always returns false.
|
static @Nonnull Predicate<Object> |
ALWAYS_TRUE
Stores a predicate which always returns true.
|
| Modifier and Type | Method and Description |
|---|---|
default <INITIAL_INPUT> |
after(@Nonnull UnaryFunction<? super INITIAL_INPUT,? extends INPUT> function)
Returns the composition of the given function followed by this predicate.
|
static <INPUT> @Nonnull Predicate<INPUT> |
and(@Nonnull FiniteIterable<? extends Predicate<? super INPUT>> predicates)
Returns the conjunction of the given predicates.
|
default @Nonnull Predicate<INPUT> |
and(@Nonnull Predicate<? super INPUT> predicate)
Returns the conjunction of this predicate with the given predicate.
|
default @Nonnull UnaryFunction<INPUT,Boolean> |
asFunction()
Returns this predicate as a unary function.
|
default @Nonnull Predicate<INPUT> |
negate()
Returns the negation of this predicate.
|
static <INPUT> @Nonnull Predicate<INPUT> |
or(@Nonnull FiniteIterable<? extends Predicate<? super INPUT>> predicates)
Returns the disjunction of the given predicates.
|
static <INPUT> @Nonnull Predicate<INPUT> |
or(Predicate<? super INPUT>... predicates)
Returns the disjunction of the given predicates.
|
default @Nonnull Predicate<INPUT> |
or(@Nonnull Predicate<? super INPUT> predicate)
Returns the disjunction of this predicate with the given predicate.
|
default @Nonnull Predicate<INPUT> |
replaceNull(boolean defaultValue)
Returns a new predicate based on this predicate that returns the given default value for null.
|
after, and, compose, evaluate, or, or, suppressExceptions, suppressExceptions, suppressExceptions, suppressExceptions@Nonnull static final @Nonnull Predicate<Object> ALWAYS_TRUE
@Pure @Nonnull default @Nonnull Predicate<INPUT> and(@Nonnull @Nonnull Predicate<? super INPUT> predicate)
@Pure @Nonnull static <INPUT> @Nonnull Predicate<INPUT> and(@Nonnull @Nonnull FiniteIterable<? extends Predicate<? super INPUT>> predicates)
and in interface FailablePredicate<INPUT,RuntimeException>@Pure @Nonnull default @Nonnull Predicate<INPUT> or(@Nonnull @Nonnull Predicate<? super INPUT> predicate)
@Pure @SafeVarargs @Nonnull static <INPUT> @Nonnull Predicate<INPUT> or(@Nonnull @NonNullableElements Predicate<? super INPUT>... predicates)
@Pure @Nonnull static <INPUT> @Nonnull Predicate<INPUT> or(@Nonnull @Nonnull FiniteIterable<? extends Predicate<? super INPUT>> predicates)
or in interface FailablePredicate<INPUT,RuntimeException>@Pure @Nonnull default @Nonnull Predicate<INPUT> negate()
FailablePredicatenegate in interface FailablePredicate<INPUT,RuntimeException>@Pure @Nonnull default <INITIAL_INPUT> @Nonnull Predicate<INITIAL_INPUT> after(@Nonnull @Nonnull UnaryFunction<? super INITIAL_INPUT,? extends INPUT> function)
@Pure @Nonnull default @Nonnull UnaryFunction<INPUT,Boolean> asFunction()
FailablePredicateasFunction in interface FailablePredicate<INPUT,RuntimeException>@Pure @Nonnull default @Nonnull Predicate<INPUT> replaceNull(boolean defaultValue)
FailablePredicatereplaceNull in interface FailablePredicate<INPUT,RuntimeException>Copyright © 2017. All rights reserved.