Class ExpandedTask<A,B>
java.lang.Object
ch.tocco.nice2.persist.core.api.exec.ExpandedTask<A,B>
- All Implemented Interfaces:
PersistTask<Iterable<A>,
,Iterable<B>> PersistTaskIterable<Iterable<A>,
B>
Takes multiple inputs and runs its inner task with each. The results are
collected in a list. Nulls are by default ignored, but can be included
via
withNulls()
-
Constructor Summary
ConstructorDescriptionExpandedTask
(PersistTask<A, B> task) ExpandedTask
(PersistTask<A, B> task, @Nullable CollectMode collectMode) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTaskIterable
filter, find, flatMap, forEach, get, get, get, getOnlyElement, getOnlyElement, getOnlyElement, map
-
Constructor Details
-
ExpandedTask
-
ExpandedTask
-
-
Method Details
-
run
@Nullable public @Nullable Iterable<B> run(Optional<Iterable<A>> a, CommandContext commandContext) throws Exception - Specified by:
run
in interfacePersistTask<A,
B> - Throws:
Exception
-
unwrap
Description copied from interface:PersistTask
If this task is composed of inner tasks, you must give access to the inner tasks by overriding this method.- Specified by:
unwrap
in interfacePersistTask<A,
B> - Returns:
- all inner tasks.
-
withNulls
-
toString
-