public class CsvMapReader<K,V> extends BaseCsvReader<MutableMap<K,V>>
Modifier and Type | Field and Description |
---|---|
protected Map<Integer,K> |
mapping
映射
key: column
value: valueKey
|
Modifier | Constructor and Description |
---|---|
|
CsvMapReader(CsvReader reader) |
|
CsvMapReader(CsvReader reader,
Collection<MutableMap<K,V>> rows) |
protected |
CsvMapReader(CsvReader reader,
Collection<MutableMap<K,V>> rows,
Consumer<MutableMap<K,V>> consumer) |
|
CsvMapReader(CsvReader reader,
Consumer<MutableMap<K,V>> consumer) |
Modifier and Type | Method and Description |
---|---|
CsvMapReader<K,V> |
defaultValue(K key,
V value)
设置默认值
|
CsvMapReader<K,V> |
linked()
使用 linkedMap
|
CsvMapReader<K,V> |
mapping(int column,
K k) |
CsvMapReader<K,V> |
mapping(int column,
K k,
V defaultValue)
映射
|
CsvMapReader<K,V> |
nullPutKey(boolean nullPutKey)
如果为 null 是否插入 key
|
protected MutableMap<K,V> |
parserRow(String[] row)
解析行
|
clear, close, get, get, getOption, getRaw, getReader, getRowNum, getRows, iterator, nextRow, read, read, readRow, skip, skip, skipEmptyRows
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public CsvMapReader(CsvReader reader)
public CsvMapReader(CsvReader reader, Collection<MutableMap<K,V>> rows)
public CsvMapReader(CsvReader reader, Consumer<MutableMap<K,V>> consumer)
protected CsvMapReader(CsvReader reader, Collection<MutableMap<K,V>> rows, Consumer<MutableMap<K,V>> consumer)
public CsvMapReader<K,V> linked()
public CsvMapReader<K,V> nullPutKey(boolean nullPutKey)
nullPutKey
- ignorepublic CsvMapReader<K,V> mapping(int column, K k)
public CsvMapReader<K,V> mapping(int column, K k, V defaultValue)
column
- columnk
- valueKeydefaultValue
- defaultValuepublic CsvMapReader<K,V> defaultValue(K key, V value)
key
- keyvalue
- 默认值protected MutableMap<K,V> parserRow(String[] row)
BaseCsvReader
parserRow
in class BaseCsvReader<MutableMap<K,V>>
row
- rowCopyright © 2024. All rights reserved.