IN
- The input type of the function (and the type of elements in the
list)OUT
- The output type of the function (and type of elements in the
resultant list)public class ContextListFunction<IN,OUT> extends ContextAdaptor<Function<IN,OUT>,List<IN>,List<OUT>> implements Function<Context,Context>
Function
to a list held within a single element of a
Context
, writing the resultant list back to the Context
,
potentially with a different key.extract, inner, insert
Constructor and Description |
---|
ContextListFunction(Function<IN,OUT> inner,
ContextExtractor<List<IN>> extract,
ContextInsertor<List<OUT>> insert)
Construct with the given options.
|
ContextListFunction(Function<IN,OUT> inner,
String both)
Construct with the given function.
|
ContextListFunction(Function<IN,OUT> inner,
String extract,
String insert)
Construct with the function.
|
Modifier and Type | Method and Description |
---|---|
Context |
apply(Context in)
Apply the function to the input argument and return the result.
|
public ContextListFunction(Function<IN,OUT> inner, ContextExtractor<List<IN>> extract, ContextInsertor<List<OUT>> insert)
inner
- the functionextract
- the extractorinsert
- the insertorpublic ContextListFunction(Function<IN,OUT> inner, String extract, String insert)
inner
- the functionextract
- the key to extract from the context to produce the input for
the objectinsert
- the key to insert with the the output for the objectpublic ContextListFunction(Function<IN,OUT> inner, String both)
inner
- the functionboth
- the key to extract/insert