eu.reservoir.monitoring.core.table
Class DefaultTable

java.lang.Object
  extended by eu.reservoir.monitoring.core.table.DefaultTable
All Implemented Interfaces:
Table, java.io.Serializable

public class DefaultTable
extends java.lang.Object
implements Table

A default implementation of a Table.

See Also:
Serialized Form

Constructor Summary
DefaultTable()
          Construct a Table.
 
Method Summary
 Table addRow(java.util.List<TableValue> values)
          Add a row to the table.
 Table addRow(TableRow row)
          Add a row to the table.
 Table defineTable(java.util.List<TableAttribute> attrs)
          Define all columns.
 Table defineTable(TableHeader header)
          Define all columns
 int getColumnCount()
          Get the number of columns in the table.
 TableHeader getColumnDefinitions()
          Get the list of all the column definitions.
 TableRow getRow(int rowNo)
          Get a row.
 int getRowCount()
          Get the number of rows in the table.
 java.util.List<TableRow> toList()
          Convert the Table to a List of TableRows.
 java.lang.String toString()
          To String for a table, prints the header and the rows.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultTable

public DefaultTable()
Construct a Table.

Method Detail

defineTable

public Table defineTable(TableHeader header)
Define all columns

Specified by:
defineTable in interface Table

defineTable

public Table defineTable(java.util.List<TableAttribute> attrs)
Define all columns.

Specified by:
defineTable in interface Table

addRow

public Table addRow(TableRow row)
             throws TableException,
                    TypeException
Add a row to the table.

Specified by:
addRow in interface Table
Throws:
TableException
TypeException

addRow

public Table addRow(java.util.List<TableValue> values)
             throws TableException,
                    TypeException
Add a row to the table. Pass in a lit of TableValue.

Specified by:
addRow in interface Table
Throws:
TableException
TypeException

getRow

public TableRow getRow(int rowNo)
Get a row.

Specified by:
getRow in interface Table

getColumnCount

public int getColumnCount()
Get the number of columns in the table.

Specified by:
getColumnCount in interface Table

getRowCount

public int getRowCount()
Get the number of rows in the table.

Specified by:
getRowCount in interface Table

getColumnDefinitions

public TableHeader getColumnDefinitions()
Get the list of all the column definitions.

Specified by:
getColumnDefinitions in interface Table

toList

public java.util.List<TableRow> toList()
Convert the Table to a List of TableRows.

Specified by:
toList in interface Table

toString

public java.lang.String toString()
To String for a table, prints the header and the rows.

Overrides:
toString in class java.lang.Object


RESERVOIR Monitoring 0.6.4