|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.joone.util.CSVParser
public class CSVParser
Comma Separated Values Parser This helper class parses a string containing comma separated tokens. Each token can contain a single value or a range represented by two values separated by a separator.
| Constructor Summary | |
|---|---|
CSVParser(java.lang.String values)
Creates a new instance of CSVParser |
|
CSVParser(java.lang.String values,
boolean range)
Creates a new instance of CSVParser |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
Test |
double[] |
parseDouble()
Parse the string and returns an array containing all the values encountered. |
int[] |
parseInt()
Parse the string and returns an array containing all the values encountered. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CSVParser(java.lang.String values)
values - The string containing the values to parse
public CSVParser(java.lang.String values,
boolean range)
values - The string containing the values to parserange - true (default) if ranges allowed| Method Detail |
|---|
public int[] parseInt()
throws java.lang.NumberFormatException
java.lang.NumberFormatException
public double[] parseDouble()
throws java.lang.NumberFormatException
java.lang.NumberFormatExceptionpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||