public class CSVReaderFormat
extends java.lang.Object
NumberVectorLabelParser
.
This class encapsulates csv format settings, that need to be parsed in
multiple places from ELKI, not only on input vector files.Modifier and Type | Class and Description |
---|---|
static class |
CSVReaderFormat.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTRIBUTE_CONCATENATION
A sign to separate attributes.
|
protected java.util.regex.Pattern |
colSep
Stores the column separator pattern
|
protected java.util.regex.Pattern |
comment
Comment pattern.
|
static java.lang.String |
COMMENT_PATTERN
Default pattern for comments.
|
static CSVReaderFormat |
DEFAULT_FORMAT
Default CSV input format.
|
static java.lang.String |
DEFAULT_SEPARATOR
A pattern defining whitespace.
|
static java.lang.String |
NUMBER_PATTERN
A pattern catching most numbers that can be parsed using
Double.parseDouble:
Some examples:
1 1. |
static java.lang.String |
QUOTE_CHARS
A quote pattern
|
protected java.lang.String |
quoteChars
Stores the quotation character
|
Constructor and Description |
---|
CSVReaderFormat(java.util.regex.Pattern colSep,
java.lang.String quoteChars,
java.util.regex.Pattern comment)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
TokenizedReader |
makeReader()
Make a reader for the configured format.
|
public static final java.lang.String DEFAULT_SEPARATOR
public static final java.lang.String QUOTE_CHARS
public static final java.lang.String NUMBER_PATTERN
1
1.
1.2
.2
-.2e-03
public static final java.lang.String COMMENT_PATTERN
public static final java.lang.String ATTRIBUTE_CONCATENATION
public static final CSVReaderFormat DEFAULT_FORMAT
protected java.util.regex.Pattern colSep
protected java.lang.String quoteChars
protected java.util.regex.Pattern comment
public CSVReaderFormat(java.util.regex.Pattern colSep, java.lang.String quoteChars, java.util.regex.Pattern comment)
colSep
- Column separatorquoteChars
- Quote charactercomment
- Comment patternpublic TokenizedReader makeReader()
Copyright © 2019 ELKI Development Team. License information.