kactoos-jvm / nnl.rocks.kactoos.scalar / AndInThreadsFunc / <init>
AndInThreadsFunc(service:
ExecutorService
, iterable:
Iterable
<
KScalar
<
Boolean
>>)
AndInThreadsFunc(iterable:
Iterable
<
KScalar
<
Boolean
>>)
AndInThreadsFunc(proc:
Proc
<
X
>, vararg src:
X
)
proc
- Proc to map
src
- The iterable
X
- Type of items in the iterableAndInThreadsFunc(func:
Func
<
X
,
Boolean
>, vararg src:
X
)
func
- Func to map
src
- The iterable
X
- Type of items in the iterableAndInThreadsFunc(proc:
Proc
<
X
>, src:
Iterable
<
X
>)
src
- The iterable
proc
- Proc to use
X
- Type of items in the iterableAndInThreadsFunc(func:
Func
<
X
,
Boolean
>, src:
Iterable
<
X
>)
src
- The iterable
func
- Func to map
X
- Type of items in the iterableAndInThreadsFunc(svc:
ExecutorService
, proc:
Proc
<
X
>, vararg src:
X
)
svc
- Executable service to run thread in
proc
- Proc to map
src
- The iterable
X
- Type of items in the iterableAndInThreadsFunc(svc:
ExecutorService
, func:
Func
<
X
,
Boolean
>, vararg src:
X
)
svc
- Executable service to run thread in
func
- Func to map
src
- The iterable
X
- Type of items in the iterableAndInThreadsFunc(svc:
ExecutorService
, proc:
Proc
<
X
>, src:
Iterable
<
X
>)
Ctor.
svc
- Executable service to run thread in
src
- The iterable
proc
- Proc to use
X
- Type of items in the iterableAndInThreadsFunc(svc:
ExecutorService
, func:
Func
<
X
,
Boolean
>, src:
Iterable
<
X
>)
Ctor.
svc
- Executable service to run thread in
src
- The iterable
func
- Func to map
X
- Type of items in the iterableAndInThreadsFunc(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
X
- Type of items in the iterable
See Also
Since 0.25