org.zkoss.pivot
Interface Calculator

All Known Implementing Classes:
AbstractCalculator, NumericBinaryCalculator

public interface Calculator

A calculator calculate a number for PivotField

Author:
jumperchen

Method Summary
 java.lang.Number calculate(java.util.Collection<java.lang.Object> data)
          Returns a calculated number for each data cell.
 java.lang.String getType()
          This is the key to identify whether two Calculator carry the same behavior so they can be cascaded.
 

Method Detail

calculate

java.lang.Number calculate(java.util.Collection<java.lang.Object> data)
Returns a calculated number for each data cell.


getType

java.lang.String getType()
This is the key to identify whether two Calculator carry the same behavior so they can be cascaded. For example, suppose there is a Sum Calculator on a column field and a Count Calculator on a row field. The intersecting cell of their subtotal ranks should be empty, as Sum of Count or Count of Sum does not really make sense (they are of different type).



Copyright © 2012. All Rights Reserved.