Package com.day.cq.wcm.foundation
Class Table
- java.lang.Object
-
- com.day.cq.wcm.foundation.Table
-
public class Table extends Object
Implements a very basic table parser.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTable.Attributesstatic classTable.Cellstatic classTable.ColTagclassTable.ColumnclassTable.Rowstatic classTable.Tag
-
Constructor Summary
Constructors Constructor Description Table()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()static TablefromCSV(String s)static TablefromCSV(String s, char delim)static TablefromXML(Reader r)static TablefromXML(String s)Table.AttributesgetAttributes()Table.TaggetCaption()Table.CellgetCell(int row, int col, boolean create)List<Table.ColTag>getColTags()Table.ColumngetColumn(int nr)List<Table.Column>getColumns()double[][]getDoubleData()double[][]getDoubleData(int rowStart, int numRows, int colStart, int numCols)int[][]getIntData()int[][]getIntData(int rowStart, int numRows, int colStart, int numCols)intgetNumCols()intgetNumRows()Table.RowgetRow(int nr)List<Table.Row>getRows()TablesetAttribute(String name, String value)Table.TagsetCaption(String text)voidsetSize(int numRows, int numCols)voidtoHtml(Writer out)
-
-
-
Method Detail
-
getColTags
public List<Table.ColTag> getColTags()
-
getAttributes
public Table.Attributes getAttributes()
-
getCaption
public Table.Tag getCaption()
-
getCell
public Table.Cell getCell(int row, int col, boolean create)
-
getIntData
public int[][] getIntData(int rowStart, int numRows, int colStart, int numCols)
-
getIntData
public int[][] getIntData()
-
getDoubleData
public double[][] getDoubleData(int rowStart, int numRows, int colStart, int numCols)
-
getDoubleData
public double[][] getDoubleData()
-
setSize
public void setSize(int numRows, int numCols)
-
getColumns
public List<Table.Column> getColumns()
-
getRow
public Table.Row getRow(int nr)
-
getColumn
public Table.Column getColumn(int nr)
-
getNumCols
public int getNumCols()
-
getNumRows
public int getNumRows()
-
clear
public void clear()
-
fromXML
public static Table fromXML(Reader r) throws IOException
- Throws:
IOException
-
toHtml
public void toHtml(Writer out) throws IOException
- Throws:
IOException
-
-