K - keypublic class PositionalStringMapGenerator<K> extends PositionalMapGenerator<K,String>
| Constructor and Description |
|---|
PositionalStringMapGenerator(K... keys)
Creates a new positional string map generator
|
| Modifier and Type | Method and Description |
|---|---|
<X> Iterable<X> |
split(Class<X> clazz,
Iterable<String> elements,
String separator)
Pass a list of strings and return a list of objects constructed by passing the splitted string values to the
constructor of the new object.
|
Iterable<Map<K,String>> |
split(Iterable<String> elements,
String separator)
Pass a list of strings and return a list of maps where each key has a value according to the position in the
splitted array relative to the position of the key in the constructor.
|
asMap, constructpublic PositionalStringMapGenerator(K... keys)
keys - public Iterable<Map<K,String>> split(Iterable<String> elements, String separator)
elements - list of strings which will be splittedseparator - separatorpublic <X> Iterable<X> split(Class<X> clazz, Iterable<String> elements, String separator)
This method doesn't need to setup a list of key names in the constructor
X - some classclazz - some classelements - list of strings to splitseparator - separatorCopyright © 2018. All rights reserved.