Interface Predicate<A>
- Type Parameters:
A- The argument type
- All Superinterfaces:
Applicative<Boolean,Fn1<A, ?>>, Cartesian<A, Boolean, Fn1<?, ?>>, Cocartesian<A, Boolean, Fn1<?, ?>>, Contravariant<A, Profunctor<?, Boolean, Fn1<?, ?>>>, Fn1<A, Boolean>, Functor<Boolean, Fn1<A, ?>>, Monad<Boolean, Fn1<A, ?>>, MonadReader<A, Boolean, Fn1<A, ?>>, MonadRec<Boolean, Fn1<A, ?>>, MonadWriter<A, Boolean, Fn1<A, ?>>, Profunctor<A, Boolean, Fn1<?, ?>>
- All Known Implementing Classes:
Empty
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A specialized
Fn1 that returns a Boolean.-
Method Summary
Modifier and TypeMethodDescriptionLeft-to-right short-circuiting logical conjunction.default <Y,Z> BiPredicate <Y, Z> Right-to-left composition between different arity functions.default <Z> Predicate<Z> Contravariantly mapA <- B.default <Z> Predicate<Z> Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.discardR(Applicative<C, Fn1<A, ?>> appB) Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative.static <A> Predicate<A> fromPredicate(Predicate<A> predicate) negate()Logical negation.Left-to-right short-circuiting logical disjunction.static <A> Predicate<A> Static factory method to create a predicate from anFn1.default <Z> BiPredicate<Z, A> widen()Widen this function's argument list by prepending an ignored argument of any type to the front.
-
Method Details
-
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,Boolean, Fn1<?, ?>> - Specified by:
diMapLin interfaceCocartesian<A,Boolean, Fn1<?, ?>> - Specified by:
diMapLin interfaceFn1<A,Boolean> - Specified by:
diMapLin interfaceProfunctor<A,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,Boolean, Fn1<?, ?>> - Specified by:
contraMapin interfaceCocartesian<A,Boolean, Fn1<?, ?>> - Specified by:
contraMapin interfaceContravariant<A, Profunctor<?,Boolean, Fn1<?, ?>>> - Specified by:
contraMapin interfaceFn1<A,Boolean> - Specified by:
contraMapin interfaceProfunctor<A,Boolean, Fn1<?, ?>> - Type Parameters:
Z- the new parameter type- Parameters:
fn- the mapping function- Returns:
- the mapped Contravariant functor instance
-
widen
-
discardR
Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative. This is generally useful for sequentially performing side-effects.- Specified by:
discardRin interfaceApplicative<Boolean,Fn1<A, ?>> - Specified by:
discardRin interfaceFn1<A,Boolean> - Specified by:
discardRin interfaceMonad<Boolean,Fn1<A, ?>> - Specified by:
discardRin interfaceMonadReader<A,Boolean, Fn1<A, ?>> - Specified by:
discardRin interfaceMonadRec<Boolean,Fn1<A, ?>> - Specified by:
discardRin interfaceMonadWriter<A,Boolean, Fn1<A, ?>> - Type Parameters:
C- the type of appB's parameter- Parameters:
appB- the other Applicative- Returns:
- this Applicative
-
compose
Right-to-left composition between different arity functions. Preserves highest arity in the return type. -
and
-
or
-
negate
-
toPredicate
-
predicate
-
fromPredicate
-