Constructor and Description |
---|
LineData() |
Modifier and Type | Method and Description |
---|---|
void |
addDataItem(DataItem item)
Same as
addValue(String columnName, String value) , but you can provide a column index on
the new DataItem |
void |
addValue(String columnName,
String value)
Adds a new column and its value to the line represented by this object.
|
String |
getColumn(Integer index)
Given an index number, returns the column name.
|
String |
getCsvHeader()
Return a CSV formated string representing the header ( list of columns )
of the line represented by this object
|
String |
getCsvLine()
Return a CSV formated string representing the line ( list of values )
of the line represented by this object
|
String |
getData(Integer index)
Given an index number, returns the data value.
|
String |
getData(String columnName)
Given a column name, return the correspondent data
of the line represented by this object
|
Integer |
getIndex(String columnName)
Given a column name, returns its index or -1 if not found.
|
List<DataItem> |
getLine()
Return the internal list of
DataItem objects representing the CSV line. |
public void addValue(String columnName, String value)
columnName
- The name of the new column you're adding to the CSV.value
- The data for this columnpublic void addDataItem(DataItem item)
addValue(String columnName, String value)
, but you can provide a column index on
the new DataItem
item
- A DataItem
object representing the column, data and column index.public List<DataItem> getLine()
DataItem
objects representing the CSV line.public String getCsvHeader()
public String getCsvLine()
public Integer getIndex(String columnName)
public String getData(String columnName)
Copyright © 2015 Carlos Magno Oliveira de Abreu. All rights reserved.