Package io.activej.async.function
Interface AsyncBiPredicate<T,U>
- All Superinterfaces:
AsyncBiPredicateEx<T,U>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,U> AsyncBiPredicate<T, U> Returns anAsyncBiPredicatethat always returns promise offalsestatic <T,U> AsyncBiPredicate<T, U> Returns anAsyncBiPredicatethat always returns promise oftruedefault AsyncBiPredicate<T,U> and(AsyncBiPredicate<? super T, ? super U> other) Returns a composedAsyncBiPredicatethat represents a logical AND of this asynchronous predicate and the otherdefault AsyncBiPredicate<T,U> negate()NegatesthisAsyncBiPredicatestatic <T,U> AsyncBiPredicate<T, U> not(AsyncBiPredicate<? super T, ? super U> predicate) Negates a givenAsyncBiPredicatestatic <T,U> AsyncBiPredicate<T, U> of(io.activej.common.function.BiPredicateEx<? super T, ? super U> predicate) Wraps aBiPredicateExinterface.default AsyncBiPredicate<T,U> or(AsyncBiPredicate<? super T, ? super U> other) Returns a composedAsyncBiPredicatethat represents a logical OR of this asynchronous predicate and the otherstatic <T,U> AsyncBiPredicate<T, U> sanitize(AsyncBiPredicateEx<? super T, ? super U> predicate)
-
Method Details
-
test
- Specified by:
testin interfaceAsyncBiPredicateEx<T,U>
-
of
static <T,U> AsyncBiPredicate<T,U> of(io.activej.common.function.BiPredicateEx<? super T, ? super U> predicate) Wraps aBiPredicateExinterface.- Parameters:
predicate- aBiPredicateEx- Returns:
AsyncBiPredicatethat works on top ofBiPredicateExinterface
-
sanitize
-
alwaysTrue
Returns anAsyncBiPredicatethat always returns promise oftrue -
alwaysFalse
Returns anAsyncBiPredicatethat always returns promise offalse -
not
Negates a givenAsyncBiPredicate- Parameters:
predicate- an originalAsyncBiPredicate- Returns:
- an
AsyncBiPredicatethat represents a logical negation of original predicate
-
negate
NegatesthisAsyncBiPredicate- Returns:
- an
AsyncBiPredicatethat represents a logical negation ofthispredicate
-
and
Returns a composedAsyncBiPredicatethat represents a logical AND of this asynchronous predicate and the otherUnlike Java's
Predicate.and(Predicate)this method does not provide short-circuit. If eitherthisorotherpredicate returns an exceptionally completed promise, the combined asynchronous predicate also returns an exceptionally completed promise- Parameters:
other- otherAsyncBiPredicatethat will be logically ANDed withthispredicate- Returns:
- a composed
AsyncBiPredicatethat represents a logical AND of this asynchronous predicate and the other
-
or
Returns a composedAsyncBiPredicatethat represents a logical OR of this asynchronous predicate and the otherUnlike Java's
Predicate.or(Predicate)this method does not provide short-circuit. If eitherthisorotherpredicate returns an exceptionally completed promise, the combined asynchronous predicate also returns an exceptionally completed promise- Parameters:
other- otherAsyncBiPredicatethat will be logically ORed withthispredicate- Returns:
- a composed
AsyncBiPredicatethat represents a logical OR of this asynchronous predicate and the other
-