public interface PivotSummaryCalculator extends SummaryCalculator
SummaryCalculator
under the grid package.
This interface added extra parameters (such as PivotValueProvider, PivotField, Values for rows and columns etc.) to
addValue methods in case the summary calculation needs to know about it. However in our default implementation, these
extra parameters are not used.ALLOWED_SUMMARIES_ALL, ALLOWED_SUMMARIES_COUNT, ALLOWED_SUMMARIES_MAX_MIN_COUNT, SUMMARY_CONSTANT, SUMMARY_COUNT, SUMMARY_CUSTOM, SUMMARY_MAX, SUMMARY_MEAN, SUMMARY_MIN, SUMMARY_NONE, SUMMARY_RESERVED_MAX, SUMMARY_STDDEV, SUMMARY_SUM, SUMMARY_VAR
Modifier and Type | Method and Description |
---|---|
void |
addValue(IPivotDataModel dataModel,
PivotField field,
int rowIndex,
int columnIndex,
Object value)
Deprecated.
|
void |
addValue(PivotValueProvider valueProvider,
PivotField field,
Object value)
Deprecated.
|
void |
addValue(PivotValueProvider dataModel,
PivotField field,
Values rowValues,
Values columnValues,
Object value)
Adds a value for calculation.
|
addValue, clear, getAllowedSummaries, getAllowedSummaries, getCount, getNumberOfSummaries, getSummaryName, getSummaryResult
void addValue(PivotValueProvider dataModel, PivotField field, Values rowValues, Values columnValues, Object value)
SummaryCalculator.addValue(Object)
which only takes the value as parameter,
this method provides PivotValueProvider, PivotField and row/column values of the cell as in the DataTableModel.
To get the row indices in the original table model, please try to use the following code.
((IPivotDataModel) dataModel).getDataAt(((DefaultValues) rowValues).toCompoundKey(), ((DefaultValues)
columnValues).toCompoundKey());
dataModel
- the PivotDataModelfield
- the PivotFieldrowValues
- the row values corresponding to the cell to calculate.columnValues
- the column values corresponding to the cell to calculate.value
- the value@Deprecated void addValue(IPivotDataModel dataModel, PivotField field, int rowIndex, int columnIndex, Object value)
addValue(PivotValueProvider, PivotField, Values, Values, Object)
SummaryCalculator.addValue(Object)
which only takes the value as parameter,
this method provides PivotDataModel, PivotField and row/column index of the cell as in the DataTableModel.dataModel
- the PivotDataModelfield
- the PivotFieldrowIndex
- the row index as in the PivotDataModel#getDataTableModel. It could be -1 if the row index is
not available.columnIndex
- the column index as in the PivotDataModel#getDataTableModel. It could be -1 if the column
index is not available.value
- the value@Deprecated void addValue(PivotValueProvider valueProvider, PivotField field, Object value)
addValue(PivotValueProvider, PivotField, Values, Values, Object)
valueProvider
- the PivotValueProviderfield
- the PivotFieldvalue
- the value