public final class AndInThreads extends Object implements Scalar<Boolean>
This class can be effectively used to iterate through
a collection, just like
Stream.forEach(java.util.function.Consumer)
works:
new AndInThreads( new IterableOf("Mary", "John", "William", "Napkin"), name -> System.out.printf("The name: %s\n", name) ).value();
This class implements Scalar
, which throws a checked
Exception
. This may not be convenient in many cases. To make
it more convenient and get rid of the checked exception you can
use UncheckedScalar
or IoCheckedScalar
decorators.
There is no thread-safety guarantee.
UncheckedScalar
,
IoCheckedScalar
Scalar.NoNulls<T>
@SafeVarargs public AndInThreads(Proc<X> proc, X... src)
X
- Type of items in the iterableproc
- Proc to mapsrc
- The iterable@SafeVarargs public AndInThreads(Func<X,Boolean> func, X... src)
X
- Type of items in the iterablefunc
- Func to mapsrc
- The iterablepublic AndInThreads(Proc<X> proc, Iterator<X> src)
X
- Type of items in the iterablesrc
- The iterableproc
- Proc to usepublic AndInThreads(Proc<X> proc, Iterable<X> src)
X
- Type of items in the iterablesrc
- The iterableproc
- Proc to usepublic AndInThreads(Func<X,Boolean> func, Iterator<X> src)
X
- Type of items in the iterablesrc
- The iterablefunc
- Func to mappublic AndInThreads(Func<X,Boolean> func, Iterable<X> src)
X
- Type of items in the iterablesrc
- The iterablefunc
- Func to map@SafeVarargs public AndInThreads(Scalar<Boolean>... src)
src
- The iterablepublic AndInThreads(Iterator<Scalar<Boolean>> src)
src
- The iterablepublic AndInThreads(Iterable<Scalar<Boolean>> src)
src
- The iterable@SafeVarargs public AndInThreads(ExecutorService svc, Proc<X> proc, X... src)
X
- Type of items in the iterablesvc
- Executable service to run thread inproc
- Proc to mapsrc
- The iterable@SafeVarargs public AndInThreads(ExecutorService svc, Func<X,Boolean> func, X... src)
X
- Type of items in the iterablesvc
- Executable service to run thread infunc
- Func to mapsrc
- The iterablepublic AndInThreads(ExecutorService svc, Proc<X> proc, Iterator<X> src)
X
- Type of items in the iterablesvc
- Executable service to run thread insrc
- The iterableproc
- Proc to usepublic AndInThreads(ExecutorService svc, Proc<X> proc, Iterable<X> src)
X
- Type of items in the iterablesvc
- Executable service to run thread insrc
- The iterableproc
- Proc to usepublic AndInThreads(ExecutorService svc, Func<X,Boolean> func, Iterator<X> src)
X
- Type of items in the iterablesvc
- Executable service to run thread insrc
- The iterablefunc
- Func to mappublic AndInThreads(ExecutorService svc, Func<X,Boolean> func, Iterable<X> src)
X
- Type of items in the iterablesvc
- Executable service to run thread insrc
- The iterablefunc
- Func to map@SafeVarargs public AndInThreads(ExecutorService svc, Scalar<Boolean>... src)
svc
- Executable service to run thread insrc
- The iterablepublic AndInThreads(ExecutorService svc, Iterator<Scalar<Boolean>> src)
svc
- Executable service to run thread insrc
- The iterablepublic AndInThreads(ExecutorService svc, Iterable<Scalar<Boolean>> src)
svc
- Executable service to run thread insrc
- The iterableCopyright © 2017 Cactoos. All rights reserved.