Kactoos

kactoos-jvm / nnl.rocks.kactoos.scalar / AndFunc

AndFunc

class AndFunc<X : Any> : Scalar<Boolean>

Logical conjunction.

This class can be effectively used to iterate through a collection, just like java.util.stream.Stream.forEach works:

new And(
  new IterableOf("Mary", "John", "William", "Napkin"),
  name -> System.out.printf("The name: %s\n", name)
).value();

There is no thread-safety guarantee.

Parameters

iterable - The iterable

X - Type argument

See Also

IoCheckedScalar

Since 0.8

Constructors

Name Summary
<init> AndFunc(proc: Proc<X>, vararg src: X)
AndFunc(func: Func<X, Boolean>, vararg src: X)
AndFunc(proc: Proc<X>, src: Iterable<X>)
AndFunc(func: Func<X, Boolean>, src: Iterable<X>)AndFunc(iterable: Iterable<KScalar<Boolean>>)
Logical conjunction.

Functions

Name Summary
invoke fun invoke(): Boolean
Get value of this Scalar