|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wink.common.model.csv.CsvTable
public class CsvTable
Represents a CSV table with multiple rows. If the table is initialized with a header, then the header will be the first row.
Constructor Summary | |
---|---|
CsvTable()
Creates a new CsvTable without a header |
|
CsvTable(java.lang.String... header)
Creates a new CsvTable with the specified header. |
Method Summary | |
---|---|
void |
addEntity(java.lang.String[] descriptor)
Add a single row to the CSV |
void |
addRow(java.lang.String... row)
Add a row to the table. |
java.util.Iterator<java.lang.String[]> |
getEntities()
Return an iterator over the rows of the CSV as a String[]. |
java.util.List<java.lang.String[]> |
getRows()
Get the live list of rows contained in this table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CsvTable()
public CsvTable(java.lang.String... header)
header
- the header of the tableMethod Detail |
---|
public void addRow(java.lang.String... row)
getRows().add(row)
row
- the row to addpublic java.util.List<java.lang.String[]> getRows()
If the table contains a header, it will be the first element of the list.
public java.util.Iterator<java.lang.String[]> getEntities()
CsvSerializer
getEntities
in interface CsvSerializer
public void addEntity(java.lang.String[] descriptor)
CsvDeserializer
addEntity
in interface CsvDeserializer
descriptor
- the row to add
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |