Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.stats.model
Class DataTable

java.lang.Object
  extended by com.jivesoftware.base.stats.model.DataTable

public class DataTable
extends java.lang.Object

A model of a table which encapsulates columns, rows and a title. This class is just a simple data bean, it doesn't do anything advanced like check to make sure the row lengths match the column lengths, validate user input, etc.


Constructor Summary
DataTable(java.lang.String title)
          Builds a blank table with the give title.
 
Method Summary
 void addRow(java.lang.Object[] row)
          Adds (appends) a row in the table.
 java.lang.String[] getColumns()
          Returns a string array of columns for this table.
 java.util.List getRows()
          Returns the rows in the table as a list.
 java.lang.String getTitle()
          Returns the title of the table.
 boolean isOrderedList()
           
 void setColumns(java.lang.String[] columns)
          Sets the columns as a String array.
 void setOrderedList(boolean orderedList)
           
 void setTitle(java.lang.String title)
          Sets the title of the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTable

public DataTable(java.lang.String title)
Builds a blank table with the give title. No columns or rows are created.

Parameters:
title - a short title of the table.
Method Detail

getTitle

public java.lang.String getTitle()
Returns the title of the table.

Returns:
the title of the table.

setTitle

public void setTitle(java.lang.String title)
Sets the title of the table.

Parameters:
title - a new title for the table.

getColumns

public java.lang.String[] getColumns()
Returns a string array of columns for this table.

Returns:
a string array of columns for this table.

setColumns

public void setColumns(java.lang.String[] columns)
Sets the columns as a String array.

Parameters:
columns - a String array of columns for the table.

getRows

public java.util.List getRows()
Returns the rows in the table as a list. Each row is an Object array.

Returns:
the rows in the table.

addRow

public void addRow(java.lang.Object[] row)
Adds (appends) a row in the table.

Parameters:
row - the row to add (append) to the table.

isOrderedList

public boolean isOrderedList()

setOrderedList

public void setOrderedList(boolean orderedList)

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.