org.encog.util.csv
public class CSVFormat extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static CSVFormat |
DECIMAL_COMMA
Use a decimal comma, and a semicolon to separate numbers.
|
static CSVFormat |
DECIMAL_POINT
Use a decimal point, and a comma to separate numbers.
|
static CSVFormat |
EG_FORMAT
EG files, internally use a decimal point and comma separator.
|
static CSVFormat |
ENGLISH
Decimal point is typically used in English speaking counties.
|
Constructor and Description |
---|
CSVFormat()
By default use USA conventions.
|
CSVFormat(char decimal,
char separator)
Construct a CSV format with he specified decimal and separator
characters.
|
Modifier and Type | Method and Description |
---|---|
String |
format(double d,
int digits)
Format the specified number to a string with the specified number of
fractional digits.
|
char |
getDecimal() |
static char |
getDecimalCharacter()
Get the decimal character currently in use by the computer's default
location.
|
NumberFormat |
getNumberFormatter() |
char |
getSeparator() |
boolean |
isValid(String str)
Determine if the string can be parsed.
|
double |
parse(String str)
Parse the specified string to a double.
|
public static final CSVFormat DECIMAL_POINT
public static final CSVFormat DECIMAL_COMMA
public static final CSVFormat ENGLISH
public static final CSVFormat EG_FORMAT
public CSVFormat()
public CSVFormat(char decimal, char separator)
decimal
- The decimal character.separator
- The separator character.public static char getDecimalCharacter()
public String format(double d, int digits)
d
- The number to format.digits
- The number of fractional digits.public char getDecimal()
public NumberFormat getNumberFormatter()
public char getSeparator()
public boolean isValid(String str)
str
- The string to compare.public double parse(String str)
str
- The string to parse.Copyright © 2014. All Rights Reserved.