Package com.day.cq.wcm.foundation
Class Table
- java.lang.Object
-
- com.day.cq.wcm.foundation.Table
-
public class Table extends java.lang.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(java.lang.String s)
static Table
fromCSV(java.lang.String s, char delim)
static Table
fromXML(java.io.Reader r)
static Table
fromXML(java.lang.String s)
Table.Attributes
getAttributes()
Table.Tag
getCaption()
Table.Cell
getCell(int row, int col, boolean create)
java.util.List<Table.ColTag>
getColTags()
Table.Column
getColumn(int nr)
java.util.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)
java.util.List<Table.Row>
getRows()
Table
setAttribute(java.lang.String name, java.lang.String value)
Table.Tag
setCaption(java.lang.String text)
void
setSize(int numRows, int numCols)
void
toHtml(java.io.Writer out)
-
-
-
Method Detail
-
getColTags
public java.util.List<Table.ColTag> getColTags()
-
getAttributes
public Table.Attributes getAttributes()
-
setAttribute
public Table setAttribute(java.lang.String name, java.lang.String value)
-
getCaption
public Table.Tag getCaption()
-
setCaption
public Table.Tag setCaption(java.lang.String text)
-
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)
-
getRows
public java.util.List<Table.Row> getRows()
-
getColumns
public java.util.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(java.lang.String s)
-
fromXML
public static Table fromXML(java.io.Reader r) throws java.io.IOException
- Throws:
java.io.IOException
-
fromCSV
public static Table fromCSV(java.lang.String s)
-
fromCSV
public static Table fromCSV(java.lang.String s, char delim)
-
toHtml
public void toHtml(java.io.Writer out) throws java.io.IOException
- Throws:
java.io.IOException
-
-