public abstract class AbstractParser extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractParser.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static String |
ATTRIBUTE_CONCATENATION
A sign to separate attributes.
|
private Pattern |
colSep
Stores the column separator pattern
|
static OptionID |
COLUMN_SEPARATOR_ID
OptionID for the column separator parameter (defaults to whitespace as in
WHITESPACE_PATTERN . |
static String |
COMMENT
The comment character.
|
static String |
NUMBER_PATTERN
A pattern catching most numbers that can be parsed using Double.valueOf:
Some examples:
1 1. |
static String |
QUOTE_CHAR
A quote pattern
|
static OptionID |
QUOTE_ID
OptionID for the quote character parameter (defaults to a double quotation
mark as in
QUOTE_CHAR . |
protected char |
quoteChar
Stores the quotation character
|
static String |
WHITESPACE_PATTERN
A pattern defining whitespace.
|
Constructor and Description |
---|
AbstractParser(Pattern colSep,
char quoteChar)
Constructor.
|
public static final String WHITESPACE_PATTERN
public static final String QUOTE_CHAR
public static final String NUMBER_PATTERN
1
1.
1.2
.2
-.2e-03
public static final OptionID COLUMN_SEPARATOR_ID
WHITESPACE_PATTERN
.public static final OptionID QUOTE_ID
QUOTE_CHAR
.private Pattern colSep
protected char quoteChar
public static final String COMMENT
public static final String ATTRIBUTE_CONCATENATION
public AbstractParser(Pattern colSep, char quoteChar)
colSep
- Column separatorquoteChar
- Quote characterprotected List<String> tokenize(String input)
input
- Input stringprotected abstract Logging getLogger()