T
- 继承子类类型,用于this返回public class CsvConfig<T extends CsvConfig<T>> extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Character |
commentCharacter
注释符号,用于区分注释行,默认'#'
|
protected char |
fieldSeparator
字段分隔符,默认逗号','
|
protected Map<String,String> |
headerAlias
标题别名
|
protected char |
textDelimiter
文本包装符,默认双引号'"'
|
Constructor and Description |
---|
CsvConfig() |
Modifier and Type | Method and Description |
---|---|
T |
addHeaderAlias(String header,
String alias)
增加标题别名
|
T |
disableComment()
|
T |
removeHeaderAlias(String header)
去除标题别名
|
T |
setCommentCharacter(Character commentCharacter)
设置 注释符号,用于区分注释行,
null 表示忽略注释 |
T |
setFieldSeparator(char fieldSeparator)
设置字段分隔符,默认逗号','
|
T |
setHeaderAlias(Map<String,String> headerAlias)
设置标题行的别名Map
|
T |
setTextDelimiter(char textDelimiter)
设置 文本分隔符,文本包装符,默认双引号'"'
|
protected char fieldSeparator
protected char textDelimiter
protected Character commentCharacter
public T setFieldSeparator(char fieldSeparator)
fieldSeparator
- 字段分隔符,默认逗号','public T setTextDelimiter(char textDelimiter)
textDelimiter
- 文本分隔符,文本包装符,默认双引号'"'public T disableComment()
public T setCommentCharacter(Character commentCharacter)
null
表示忽略注释commentCharacter
- 注释符号,用于区分注释行public T setHeaderAlias(Map<String,String> headerAlias)
headerAlias
- 别名Mappublic T addHeaderAlias(String header, String alias)
header
- 标题alias
- 别名Copyright © 2024. All rights reserved.