T - the input typepublic final class StreamParametersMapFunction<T> extends Object implements Function<T[],Object[]>
Access to this class is available from the TestSuite interface.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_REGEX_FOR_ARRAY
This is the regex used to support the split in case the input is an
array.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Function<Object[],Object[]> |
addFieldToEachEntry(T field)
Provide a way to add a field to head parameter line.
|
<R> StreamParametersMapFunction<T> |
andMap(int idx,
Function<T,R> mapFunction)
Defines an additional Parameter Mapper function.
|
Object[] |
apply(T[] input) |
static <T,R> StreamParametersMapFunction<T> |
map(int idx,
Function<T,R> mapFunction)
Start building a Parameter Mapper function, with an initial converter.
|
static StreamParametersMapFunction<String> |
stringToParameterMap(Class<?> testClass)
Start building a Parameter Mapper function, assuming that the input are
String, and using the type of the
@Parameter field. |
public static final String DEFAULT_REGEX_FOR_ARRAY
public static <T,R> StreamParametersMapFunction<T> map(int idx, Function<T,R> mapFunction)
Not specified index are considered transformed by identity function.
T - The input type for the functionR - the result type for the functionidx - The parameter indexmapFunction - the function to be appliedpublic static StreamParametersMapFunction<String> stringToParameterMap(Class<?> testClass)
@Parameter field.
Fields not supported will not be mapped and must be handled manually,
using andMap
method.
testClass - the testClass with the annotationpublic <R> StreamParametersMapFunction<T> andMap(int idx, Function<T,R> mapFunction)
Not specified index are considered transformed by identity function.
R - The return type for the functionidx - The parameter indexmapFunction - the function to be appliedpublic static <T> Function<Object[],Object[]> addFieldToEachEntry(T field)
T - The object type to be added.field - The field to be added.Stream.map(Function)).Copyright © 2015 Powerunit. All rights reserved.