Interface BiPredicate<A,B>
- Type Parameters:
A- the first argument typeB- the second argument type
- All Superinterfaces:
Applicative<Fn1<B,Boolean>, Fn1<A, ?>>, Cartesian<A, Fn1<B, Boolean>, Fn1<?, ?>>, Cocartesian<A, Fn1<B, Boolean>, Fn1<?, ?>>, Contravariant<A, Profunctor<?, Fn1<B, Boolean>, Fn1<?, ?>>>, Fn1<A, Fn1<B, Boolean>>, Fn2<A, B, Boolean>, Functor<Fn1<B, Boolean>, Fn1<A, ?>>, Monad<Fn1<B, Boolean>, Fn1<A, ?>>, MonadReader<A, Fn1<B, Boolean>, Fn1<A, ?>>, MonadRec<Fn1<B, Boolean>, Fn1<A, ?>>, MonadWriter<A, Fn1<B, Boolean>, Fn1<A, ?>>, Profunctor<A, Fn1<B, Boolean>, Fn1<?, ?>>
- 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 TypeMethodDescriptiondefault BiPredicate<A, B> and(BiPredicate<? super A, ? super B> other) Left-to-right short-circuiting logical conjunction.Partially apply this function by passing its first argument.Contravariantly mapA <- B.default <Z> BiPredicate<Z, B> Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.default <D> BiPredicate<A, B> discardR(Applicative<D, Fn1<A, ?>> appB) Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative.default BiPredicate<B, A> flip()Flip the order of the arguments.static <A,B> BiPredicate <A, B> fromBiPredicate(BiPredicate<A, B> biPredicate) Create aBiPredicatefrom a javaBiPredicate.default BiPredicate<A, B> negate()Logical negation.default BiPredicate<A, B> or(BiPredicate<? super A, ? super B> other) Left-to-right short-circuiting logical disjunction.default BiPredicate<A, B> Convert thisBiPredicateto a javaBiPredicate.uncurry()Methods inherited from interface Fn1
andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, lazyZip, listens, local, pure, self, thunk, toFunction, trampolineM, zip, zipMethods inherited from interface Fn2
apply, checkedApply, checkedApply, compose, toBiFunction, widen
-
Method Details
-
apply
-
flip
-
discardR
Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative. This is generally useful for sequentially performing side-effects.- Specified by:
discardRin interfaceApplicative<A,B> - Specified by:
discardRin interfaceFn1<A,B> - Specified by:
discardRin interfaceFn2<A,B, Boolean> - Specified by:
discardRin interfaceMonad<A,B> - Specified by:
discardRin interfaceMonadReader<A, Fn1<B,Boolean>, Fn1<A, ?>> - Specified by:
discardRin interfaceMonadRec<A,B> - Specified by:
discardRin interfaceMonadWriter<A, Fn1<B,Boolean>, Fn1<A, ?>> - Type Parameters:
D- the type of appB's parameter- Parameters:
appB- the other Applicative- Returns:
- this Applicative
-
uncurry
-
diMapL
Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.- Specified by:
diMapLin interfaceCartesian<A, Fn1<B,Boolean>, Fn1<?, ?>> - Specified by:
diMapLin interfaceCocartesian<A, Fn1<B,Boolean>, Fn1<?, ?>> - Specified by:
diMapLin interfaceFn1<A,B> - Specified by:
diMapLin interfaceFn2<A,B, Boolean> - Specified by:
diMapLin interfaceProfunctor<A, Fn1<B,Boolean>, Fn1<?, ?>> - Type Parameters:
Z- the new argument type- Parameters:
fn- the contravariant argument mapping function- Returns:
- an
Fn1<Z, B>
-
contraMap
Contravariantly mapA <- B.- Specified by:
contraMapin interfaceCartesian<A, Fn1<B,Boolean>, Fn1<?, ?>> - Specified by:
contraMapin interfaceCocartesian<A, Fn1<B,Boolean>, Fn1<?, ?>> - Specified by:
contraMapin interfaceContravariant<A,B> - Specified by:
contraMapin interfaceFn1<A,B> - Specified by:
contraMapin interfaceFn2<A,B, Boolean> - Specified by:
contraMapin interfaceProfunctor<A, Fn1<B,Boolean>, Fn1<?, ?>> - Type Parameters:
Z- the new parameter type- Parameters:
fn- the mapping function- Returns:
- the mapped Contravariant functor instance
-
and
Left-to-right short-circuiting logical conjunction.- Parameters:
other- the biPredicate to test if this one succeeds- Returns:
- a biPredicate representing the conjunction of this biPredicate and other
-
or
Left-to-right short-circuiting logical disjunction.- Parameters:
other- the biPredicate to test if this one fails- Returns:
- a biPredicate representing the disjunction of this biPredicate and other
-
negate
-
toBiPredicate
Convert thisBiPredicateto a javaBiPredicate.- Returns:
BiPredicate
-
fromBiPredicate
Create aBiPredicatefrom a javaBiPredicate.- Type Parameters:
A- the first input typeB- the second input type- Parameters:
biPredicate- theBiPredicate- Returns:
- the
BiPredicate
-