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 class
Table.Attributes
static class
Table.Cell
static class
Table.ColTag
class
Table.Column
class
Table.Row
static class
Table.Tag
-
Constructor Summary
Constructors Constructor Description Table()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
static Table
fromCSV(String s)
static Table
fromCSV(String s, char delim)
static Table
fromXML(Reader r)
static Table
fromXML(String s)
Table.Attributes
getAttributes()
Table.Tag
getCaption()
Table.Cell
getCell(int row, int col, boolean create)
List<Table.ColTag>
getColTags()
Table.Column
getColumn(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)
int
getNumCols()
int
getNumRows()
Table.Row
getRow(int nr)
List<Table.Row>
getRows()
Table
setAttribute(String name, String value)
Table.Tag
setCaption(String text)
void
setSize(int numRows, int numCols)
void
toHtml(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
-
-