Constructor and Description |
---|
CsvRow(long originalLineNumber,
Map<String,Integer> headerMap,
List<String> fields)
构造
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
String element) |
boolean |
add(String e) |
boolean |
addAll(Collection<? extends String> c) |
boolean |
addAll(int index,
Collection<? extends String> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
String |
get(int index) |
String |
getByName(String name)
获取标题对应的字段内容
|
int |
getFieldCount()
获取字段格式
|
Map<String,String> |
getFieldMap()
获取标题与字段值对应的Map
|
long |
getOriginalLineNumber()
获取原始行号,多行情况下为首行行号。
|
List<String> |
getRawList()
获取本行所有字段值列表
|
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<String> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<String> |
listIterator() |
ListIterator<String> |
listIterator(int index) |
String |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
String |
set(int index,
String element) |
int |
size() |
List<String> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
<T> T |
toBean(Class<T> clazz)
一行数据转换为Bean对象
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public long getOriginalLineNumber()
public String getByName(String name)
name
- 标题名IllegalStateException
- CSV文件无标题行抛出此异常public Map<String,String> getFieldMap()
IllegalStateException
- CSV文件无标题行抛出此异常public <T> T toBean(Class<T> clazz)
T
- Bean类型clazz
- bean类public int getFieldCount()
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(String e)
public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<String>
containsAll
in interface List<String>
public boolean addAll(Collection<? extends String> c)
public boolean addAll(int index, Collection<? extends String> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public int lastIndexOf(Object o)
lastIndexOf
in interface List<String>
public ListIterator<String> listIterator()
listIterator
in interface List<String>
public ListIterator<String> listIterator(int index)
listIterator
in interface List<String>
Copyright © 2024. All rights reserved.