com.citra.treetable
Class AbstractAggregator
java.lang.Object
com.citra.treetable.AbstractAggregator
- All Implemented Interfaces:
- Aggregator
- Direct Known Subclasses:
- AbstractDatabaseAggregator, DefaultCellAggregator, TreeNodeAggregator
public abstract class AbstractAggregator
- extends Object
- implements Aggregator
AbstractAggregator implements the prepareValue
method
in order to evaluate an aggregate value only if that value is null.
Method Summary |
Object |
prepareValue(AggregateRow node,
int columnIndex)
This method retrieves the aggregate value that was set for the row at rowIndex and columnIndex. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAggregator
public AbstractAggregator()
- Constructs an AbstractAggregator.
prepareValue
public Object prepareValue(AggregateRow node,
int columnIndex)
- This method retrieves the aggregate value that was set for the row at rowIndex and columnIndex.
If this value is null,
Aggregator.getAggregateValue(com.citra.treetable.AggregateRow, int)
is called in order to evaluate it, and the value returned
is assigned as the aggregate value of the row via the TreeTableRow.setAggregateValue(java.lang.Object, int)
method.
In this way, aggregate values are evaluated only once, in order to avoid manifold operations.
- Specified by:
prepareValue
in interface Aggregator
- Parameters:
node
- the nodecolumnIndex
- the index of the column
- Returns:
- the aggregate value of
node