|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jidesoft.pivot.BigDecimalSummaryCalculator
@Deprecated public class BigDecimalSummaryCalculator
The implementation of SummaryCalculator for BigDecimal. In this implementation, we calculate seven statistics - Sum, Min, Max, Mean, Var, StdDev, Count.
Different from what is already in DefaultSummaryCalculator, some statistics calculations need a MathContext to control the precision. You can set it usingsetMathContext(java.math.MathContext). This context is used in
Mean, Var, StdDev calculation.
| Field Summary |
|---|
| Fields inherited from interface com.jidesoft.pivot.SummaryCalculator |
|---|
ALLOWED_SUMMARIES_ALL, ALLOWED_SUMMARIES_COUNT, ALLOWED_SUMMARIES_MAX_MIN_COUNT |
| Constructor Summary | |
|---|---|
BigDecimalSummaryCalculator()
Deprecated. |
|
BigDecimalSummaryCalculator(MathContext mathContext)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
addValue(IPivotDataModel pivotDataModel,
PivotField pivotField,
int row,
int column,
Object object)
Deprecated. Adds a value for calculation. |
void |
addValue(Object object)
Deprecated. Adds a value for calculation. |
void |
addValue(PivotValueProvider valueProvider,
PivotField field,
Object object)
Deprecated. Adds a value for calculation.. |
void |
addValue(PivotValueProvider dataModel,
PivotField field,
Values rowValues,
Values columnValues,
Object object)
Deprecated. Adds a value for calculation. |
void |
clear()
Deprecated. Clears all previous added values. |
int[] |
getAllowedSummaries(Class<?> type)
Deprecated. Gets the allowed summary types for a data type. |
int[] |
getAllowedSummaries(Class<?> type,
ConverterContext context)
Deprecated. Gets the allowed summary types. |
long |
getCount()
Deprecated. Gets the number of values that have been added so far. |
MathContext |
getMathContext()
Deprecated. Gets the math context. |
int |
getNumberOfSummaries()
Deprecated. Gets the number of summary types. |
String |
getSummaryName(Locale locale,
int summarySort)
Deprecated. Gets the summary name for the specified type. |
Object |
getSummaryResult(int summarySort)
Deprecated. Gets the summary result for the specified type. |
boolean |
isBiasCorrected()
Deprecated. Checks if the biasCorrect is set. |
void |
setBiasCorrected(boolean biasCorrected)
Deprecated. Sets the biasCorrected flag. |
void |
setMathContext(MathContext mathContext)
Deprecated. Sets the math context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BigDecimalSummaryCalculator()
public BigDecimalSummaryCalculator(MathContext mathContext)
| Method Detail |
|---|
public MathContext getMathContext()
public void setMathContext(MathContext mathContext)
mathContext - a new MathContext.public void addValue(Object object)
SummaryCalculator
addValue in interface SummaryCalculatorobject - the value
public void addValue(IPivotDataModel pivotDataModel,
PivotField pivotField,
int row,
int column,
Object object)
SummaryCalculatorSummaryCalculator.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.
addValue in interface SummaryCalculatorpivotDataModel - the PivotDataModelpivotField - the PivotFieldrow - the row index as in the PivotDataModel#getDataTableModel. It could be -1 if the row index is
not available.column - the column index as in the PivotDataModel#getDataTableModel. It could be -1 if the column
index is not available.object - the value
public void addValue(PivotValueProvider valueProvider,
PivotField field,
Object object)
SummaryCalculator
addValue in interface SummaryCalculatorvalueProvider - the PivotValueProviderfield - the PivotFieldobject - the value
public void addValue(PivotValueProvider dataModel,
PivotField field,
Values rowValues,
Values columnValues,
Object object)
SummaryCalculatorSummaryCalculator.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());
addValue in interface SummaryCalculatordataModel - the PivotDataModelfield - the PivotFieldrowValues - the row values corresponding to the cell to calculate.columnValues - the column values corresponding to the cell to calculate.object - the valuepublic void clear()
SummaryCalculator
clear in interface SummaryCalculatorpublic long getCount()
SummaryCalculator
getCount in interface SummaryCalculatorpublic int getNumberOfSummaries()
SummaryCalculator
getNumberOfSummaries in interface SummaryCalculator
public String getSummaryName(Locale locale,
int summarySort)
SummaryCalculator
getSummaryName in interface SummaryCalculatorlocale - the current locale
public Object getSummaryResult(int summarySort)
SummaryCalculator
getSummaryResult in interface SummaryCalculatorpublic boolean isBiasCorrected()
public void setBiasCorrected(boolean biasCorrected)
biasCorrected - true or false.public int[] getAllowedSummaries(Class<?> type)
SummaryCalculator
getAllowedSummaries in interface SummaryCalculatortype - the data type.
public int[] getAllowedSummaries(Class<?> type,
ConverterContext context)
getAllowedSummaries in interface SummaryCalculatortype - the data type.context - the converter context. If the type is the same and you want it to have different summary types,
you can use the converter context to make them different.
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||