T
- The Class of object to be inserted: String for StringColumn, LocalDate for DateColumn,
etc.public abstract class AbstractColumnParser<T> extends Object
It serves two purposes, to determine if a string can be parsed into the desired object type, and to actually parse the string.
Implementations may take additional parameters such as a locale or DateTimeFormatter.
Modifier and Type | Field and Description |
---|---|
protected List<String> |
missingValueStrings |
Constructor and Description |
---|
AbstractColumnParser(ColumnType columnType) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
canParse(String s) |
ColumnType |
columnType() |
boolean |
isMissing(String s) |
abstract T |
parse(String s) |
byte |
parseByte(String s) |
double |
parseDouble(String s) |
float |
parseFloat(String s) |
int |
parseInt(String s) |
long |
parseLong(String s) |
short |
parseShort(String s) |
protected static String |
remove(String str,
char remove) |
public AbstractColumnParser(ColumnType columnType)
public abstract boolean canParse(String s)
public ColumnType columnType()
public boolean isMissing(String s)
public byte parseByte(String s)
public int parseInt(String s)
public short parseShort(String s)
public long parseLong(String s)
public double parseDouble(String s)
public float parseFloat(String s)
Copyright © 2019. All rights reserved.