public class Csv2Data
extends java.lang.Object
"column 1"; "column 2"; "column 3"; "column 4"; "This is a cell"; 123,05; "Text with more as one line in a cell"; "more data"
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Csv2Data.Args |
(package private) static class |
Csv2Data.CmdHandler |
Modifier and Type | Field and Description |
---|---|
(package private) char |
cDecimalSep
'.' if the
separator is ',', elsewhere ','. |
(package private) int |
colident
Column where the identifier is found.
|
(package private) java.util.List<java.lang.String> |
columns |
(package private) java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
dataMap |
(package private) int |
lineNr |
(package private) java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
lines |
(package private) MainCmdLogging_ifc |
log |
(package private) char |
separator
The character which is the separator of columns in the line.
|
static java.lang.String |
sVersion
Version, history and license.
|
Constructor and Description |
---|
Csv2Data() |
Csv2Data(MainCmdLogging_ifc log) |
Modifier and Type | Method and Description |
---|---|
void |
createColumns(java.lang.String sLine)
The first line should contain the identifier for the columns.
|
static void |
main(java.lang.String[] cmdargs) |
java.lang.String |
parseCsv(java.lang.String sFileIn) |
java.lang.String |
parseCsvZbnf(java.lang.String sFileIn) |
void |
parseLine(java.lang.String sLineStart,
java.io.BufferedReader reader) |
java.lang.Object |
value(java.lang.String cell,
java.lang.String name)
Converts a value
|
float |
XXXfloatVal(java.lang.String cell) |
java.lang.String |
XXXparseLine(java.lang.String sLine) |
public static final java.lang.String sVersion
#value(String)
, returns a float value if it is possible.
final MainCmdLogging_ifc log
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dataMap
java.util.List<java.util.Map<java.lang.String,java.lang.String>> lines
java.util.List<java.lang.String> columns
int colident
int lineNr
char separator
createColumns(String)
.char cDecimalSep
separator
is ',', elsewhere ','.public Csv2Data(MainCmdLogging_ifc log)
public Csv2Data()
public static void main(java.lang.String[] cmdargs)
public java.lang.String parseCsv(java.lang.String sFileIn)
public void createColumns(java.lang.String sLine)
colident
.
It is the column which contains the identifier for the line.sLine
- public java.lang.String XXXparseLine(java.lang.String sLine)
public void parseLine(java.lang.String sLineStart, java.io.BufferedReader reader)
public java.lang.Object value(java.lang.String cell, java.lang.String name)
cell
- String given valuename
- the name only for test.public float XXXfloatVal(java.lang.String cell)
public java.lang.String parseCsvZbnf(java.lang.String sFileIn)