Top Description Fields Constructors Methods
org.apache.poi.ss.formula

pack-priv final Class EvaluationCache

extends Object
Class Inheritance
Imports
org.apache.poi.ss.formula.FormulaUsedBlankCellSet.BookSheetKey, .PlainCellCache.Loc, org.apache.poi.ss.formula.eval.BlankEval, .BoolEval, .ErrorEval, .NumberEval, .StringEval, .ValueEval, org.apache.poi.ss.usermodel.CellType

Performance optimisation for org.apache.poi.ss.usermodel.FormulaEvaluator. This class stores previously calculated values of already visited cells, to avoid unnecessary re-calculation when the same cells are referenced multiple times

Field Summary

Modifier and TypeField and Description
pack-priv final IEvaluationListener
_evaluationListener

only used for testing.

private final FormulaCellCache
private final PlainCellCache

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private boolean
public void
clear()

Should be called whenever there are changes to input cells in the evaluated workbook.

public FormulaCellCacheEntry
public PlainValueCellCacheEntry
getPlainValueEntry(int bookIndex, int sheetIndex, int rowIndex, int columnIndex, ValueEval value)

public void
notifyDeleteCell(int bookIndex, int sheetIndex, EvaluationCell cell)

public void
notifyUpdateCell(int bookIndex, int sheetIndex, EvaluationCell cell)

private void
updateAnyBlankReferencingFormulas(int bookIndex, int sheetIndex, final int rowIndex, final int columnIndex)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_evaluationListenerback to summary
pack-priv final IEvaluationListener _evaluationListener

only used for testing. null otherwise

_formulaCellCacheback to summary
private final FormulaCellCache _formulaCellCache
_plainCellCacheback to summary
private final PlainCellCache _plainCellCache

Constructor Detail

EvaluationCacheback to summary
pack-priv EvaluationCache(IEvaluationListener evaluationListener)

Method Detail

areValuesEqualback to summary
private boolean areValuesEqual(ValueEval a, ValueEval b)
clearback to summary
public void clear()

Should be called whenever there are changes to input cells in the evaluated workbook.

getOrCreateFormulaCellEntryback to summary
public FormulaCellCacheEntry getOrCreateFormulaCellEntry(EvaluationCell cell)
getPlainValueEntryback to summary
public PlainValueCellCacheEntry getPlainValueEntry(int bookIndex, int sheetIndex, int rowIndex, int columnIndex, ValueEval value)
notifyDeleteCellback to summary
public void notifyDeleteCell(int bookIndex, int sheetIndex, EvaluationCell cell)
notifyUpdateCellback to summary
public void notifyUpdateCell(int bookIndex, int sheetIndex, EvaluationCell cell)
updateAnyBlankReferencingFormulasback to summary
private void updateAnyBlankReferencingFormulas(int bookIndex, int sheetIndex, final int rowIndex, final int columnIndex)