Interface Predicate<T>
- Type Parameters:
T- the argument type
- All Superinterfaces:
Predicate<T>
- All Known Subinterfaces:
ByteBufferMarshaller, MarshalledValueFactory<C>, Marshaller<V,S>
- All Known Implementing Classes:
AbstractByteBufferMarshaller, ByteBufferMarshalledKeyFactory, ByteBufferMarshalledValueFactory, IdentifierMarshaller, JavaByteBufferMarshaller, JBossByteBufferMarshaller, MarshalledValueMarshaller, ProtoStreamByteBufferMarshaller, WrappedMessageByteBufferMarshaller
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Predicate<T> always()Returns a predicate that always accepts its argument.default <V> Predicate<V> Returns a predicate that applies the specified function to its argument before evaluating.default <V1,V2> BiPredicate <V1, V2> composeBinary(BiFunction<V1, V2, T> function) Returns a predicate that applies the specified function to its argument before evaluating.default DoublePredicatecomposeDouble(DoubleFunction<T> function) Returns a predicate that applies the specified function to its argument before evaluating.default IntPredicatecomposeInt(IntFunction<T> function) Returns a predicate that applies the specified function to its argument before evaluating.default LongPredicatecomposeLong(LongFunction<T> function) Returns a predicate that applies the specified function to its argument before evaluating.Returns a predicate of aMap.Entryfrom the specified key and value predicates.static <T> Predicate<T> equalTo(T object) Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.static <T extends Comparable<T>>
Predicate<T> greaterThan(T object) Returns a predicate that evaluates to true if and only if the argument is comparatively greater than the specified object.handle(BiPredicate<T, RuntimeException> handler) Returns a new predicate that delegates to this predicate using the specified exception handler.static <T> Predicate<T> identicalTo(T object) Returns a predicate that evaluates to true if and only if the argument is identical to the specified object.static <T extends Comparable<T>>
Predicate<T> lessThan(T object) Returns a predicate that evaluates to true if and only if the argument is comparatively less than the specified object.negate()static <T> Predicate<T> never()Returns a predicate that never accepts its argument.static <T> Predicate<T> Returns a predicate that evaluates to the negation of the specified predicate.static <T> Predicate<T> of(boolean result) Returns a predicate that always evaluates to the specified result.static <T> Predicate<T> of(Consumer<T> consumer, BooleanSupplier supplier) Returns a predicate that accepts its parameter via the specified consumer and returns the value returned by the specified supplier.Returns a predicate returning the exclusive disjunction of this predicate with the specified predicate.
-
Field Details
-
ALWAYS
A predicate that always returns true -
NEVER
A predicate that always returns false
-
-
Method Details
-
handle
Returns a new predicate that delegates to this predicate using the specified exception handler.- Parameters:
handler- an exception handler- Returns:
- a new predicate that delegates to this predicate using the specified exception handler.
-
compose
-
composeBinary
Returns a predicate that applies the specified function to its argument before evaluating.- Type Parameters:
V1- the former parameter typeV2- the latter parameter type- Parameters:
function- a mapping function- Returns:
- a composed predicate
-
composeDouble
Returns a predicate that applies the specified function to its argument before evaluating.- Parameters:
function- a mapping function- Returns:
- a composed predicate
-
composeInt
Returns a predicate that applies the specified function to its argument before evaluating.- Parameters:
function- a mapping function- Returns:
- a composed predicate
-
composeLong
Returns a predicate that applies the specified function to its argument before evaluating.- Parameters:
function- a mapping function- Returns:
- a composed predicate
-
negate
-
and
-
or
-
xor
-
of
Returns a predicate that always evaluates to the specified result.- Type Parameters:
T- the argument type- Parameters:
result- the fixed result- Returns:
- a predicate that always evaluates to the specified value.
-
of
Returns a predicate that accepts its parameter via the specified consumer and returns the value returned by the specified supplier.- Type Parameters:
T- the predicate type- Parameters:
consumer- the consumer of the predicate parametersupplier- the supplier of the predicate result- Returns:
- a predicate that accepts its parameter via the specified consumer and returns the value returned by the specified supplier.
-
always
Returns a predicate that always accepts its argument.- Type Parameters:
T- the argument type- Returns:
- a predicate that always accepts its argument.
-
never
Returns a predicate that never accepts its argument.- Type Parameters:
T- the argument type- Returns:
- a predicate that never accepts its argument.
-
equalTo
Returns a predicate that evaluates to true if and only if the argument is equals to the specified object.- Type Parameters:
T- the argument type- Parameters:
object- the object whose reference must match the predicate argument- Returns:
- a predicate that evaluates to true if and only if the argument is equals to the specified object.
-
identicalTo
Returns a predicate that evaluates to true if and only if the argument is identical to the specified object.- Type Parameters:
T- the argument type- Parameters:
object- the object whose reference must match the predicate argument- Returns:
- a predicate that evaluates to true if and only if the argument is identical to the specified object.
-
lessThan
Returns a predicate that evaluates to true if and only if the argument is comparatively less than the specified object.- Type Parameters:
T- the argument type- Parameters:
object- the object whose reference must match the predicate argument- Returns:
- a predicate that evaluates to true if and only if the argument is comparatively less than the specified object.
-
greaterThan
Returns a predicate that evaluates to true if and only if the argument is comparatively greater than the specified object.- Type Parameters:
T- the argument type- Parameters:
object- the object whose reference must match the predicate argument- Returns:
- a predicate that evaluates to true if and only if the argument is comparatively greater than the specified object.
-
not
Returns a predicate that evaluates to the negation of the specified predicate.- Type Parameters:
T- the argument type- Parameters:
predicate- the predicate to negate- Returns:
- a predicate that evaluates to the negation of the specified predicate.
-
entry
-