Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.treetable
Class AbstractAggregator

java.lang.Object
  extended by 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.


Constructor Summary
AbstractAggregator()
          Constructs an AbstractAggregator.
 
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
 
Methods inherited from interface com.citra.treetable.Aggregator
getAggregateValue
 

Constructor Detail

AbstractAggregator

public AbstractAggregator()
Constructs an AbstractAggregator.

Method Detail

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 node
columnIndex - the index of the column
Returns:
the aggregate value of node

Copyright © 2011 Citra Technologies. All Rights Reserved.