kactoos-jvm / nnl.rocks.kactoos.scalar / AndInThreads / <init>
AndInThreads(vararg src:
KScalar
<
Boolean
>)
AndInThreads(src:
Iterable
<
KScalar
<
Boolean
>>)
src
- The iterableAndInThreads(vararg src:
Scalar
<
Boolean
>)
AndInThreads(svc:
ExecutorService
, vararg src:
KScalar
<
Boolean
>)
AndInThreads(svc:
ExecutorService
, src:
Iterable
<
KScalar
<
Boolean
>>)
Ctor.
svc
- Executable service to run thread in
src
- The iterableAndInThreads(service:
ExecutorService
, iterable:
Iterable
<
KScalar
<
Boolean
>>, shut:
Boolean
)
Logical conjunction, in multiple threads.
This class can be effectively used to iterate through a collection, just like java.util.stream.Stream.forEach works:
new AndInThreads(
new IterableOf("Mary", "John", "William", "Napkin"),
name -> System.out.printf("The name: %s\n", name)
).value();
There is no thread-safety guarantee.
service
- Executable service to run thread in
iterable
- The iterable
shut
- Shut it down
See Also
Since 0.25