org.jfree.formula.lvalues

Class DefaultDataTable

Implemented Interfaces:
Cloneable, DataTable, LValue, Serializable

public class DefaultDataTable
extends ObjectTable
implements DataTable

Creation-Date: 05.11.2006, 13:34:01
Authors:
Thomas Morgner
Cedric Pronzato

Constructor Summary

DefaultDataTable()
Creates a new table.
DefaultDataTable(LValue[][] array)

Method Summary

Object
clone()
TypeValuePair
evaluate()
LValue[]
getChildValues()
Returns any dependent lvalues (parameters and operands, mostly).
String
getColumnName(int column)
LValue
getValueAt(int row, int column)
Type
getValueType()
Querying the value type is only valid *after* the value has been evaluated.
void
initialize(FormulaContext context)
boolean
isConstant()
Checks, whether the LValue is constant.
void
setObject(int row, int column, LValue object)
Sets the object for a cell in the table.

Constructor Details

DefaultDataTable

public DefaultDataTable()
Creates a new table.

DefaultDataTable

public DefaultDataTable(LValue[][] array)

Method Details

clone

public Object clone()
            throws CloneNotSupportedException
Specified by:
clone in interface LValue

evaluate

public TypeValuePair evaluate()
            throws EvaluationException
Specified by:
evaluate in interface LValue

getChildValues

public LValue[] getChildValues()
Returns any dependent lvalues (parameters and operands, mostly).
Specified by:
getChildValues in interface LValue
Returns:

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface DataTable

getValueAt

public LValue getValueAt(int row,
                         int column)
Specified by:
getValueAt in interface DataTable

getValueType

public Type getValueType()
Querying the value type is only valid *after* the value has been evaluated.
Specified by:
getValueType in interface LValue
Returns:

initialize

public void initialize(FormulaContext context)
            throws EvaluationException
Specified by:
initialize in interface LValue

isConstant

public boolean isConstant()
Checks, whether the LValue is constant. Constant lvalues always return the same value.
Specified by:
isConstant in interface LValue
Returns:

setObject

public void setObject(int row,
                      int column,
                      LValue object)
Sets the object for a cell in the table. The table is expanded if necessary.
Parameters:
row - the row index (zero-based).
column - the column index (zero-based).
object - the object.