public final class And extends Object implements Monoid<Boolean>, BiPredicate<Boolean,Boolean>
Modifier and Type | Method and Description |
---|---|
static And |
and() |
static Fn1<Boolean,Boolean> |
and(Boolean x) |
static Boolean |
and(Boolean x,
Boolean y) |
Boolean |
checkedApply(Boolean x,
Boolean y) |
And |
flip()
Flip the order of the arguments.
|
<B> Boolean |
foldMap(Fn1<? super B,? extends Boolean> fn,
Iterable<B> bs)
Homomorphism combined with catamorphism.
|
Boolean |
identity()
The identity element of this monoid.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
foldLeft, foldRight, monoid, monoid, reduceLeft, reduceRight
apply, apply, checkedApply, compose, contraMap, curried, curry, diMapL, discardR, fn2, fromBiFunction, toBiFunction, uncurry, widen
andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, fn1, fromFunction, lazyZip, listens, local, pure, pureFn1, thunk, toFunction, trampolineM, zip, zip
and, apply, contraMap, diMapL, discardR, fromBiPredicate, negate, or, toBiPredicate, uncurry
public Boolean identity()
Monoid
public Boolean checkedApply(Boolean x, Boolean y)
checkedApply
in interface Fn2<Boolean,Boolean,Boolean>
public <B> Boolean foldMap(Fn1<? super B,? extends Boolean> fn, Iterable<B> bs)
Monoid
Iterable<B>
to an
Iterable<A>
(that is, an Iterable
of elements this monoid is formed over), then
reduce the result from left to right. Under algebraic data types, this is isomorphic to a flatMap.foldMap
in interface Monoid<Boolean>
B
- the input Iterable element typefn
- the mapping function from A to Bbs
- the Iterable of BsMap
,
Monoid.reduceLeft(Iterable)
public static And and()