Package io.keikaiex.formula
Class FormulaEngineEx
- java.lang.Object
-
- io.keikai.model.impl.sys.formula.FormulaEngineImpl
-
- io.keikaiex.formula.FormulaEngineEx
-
- All Implemented Interfaces:
FormulaEngine
,Serializable
public class FormulaEngineEx extends FormulaEngineImpl implements FormulaEngine
A implementation of Formula Engine with XEL context. Let formula engine support user defined function, EL variable evaluation ant so on.- Author:
- Pao
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.keikai.model.impl.sys.formula.FormulaEngineImpl
FormulaEngineImpl.ErrorFormulaExpressionImpl, FormulaEngineImpl.EvalContext, FormulaEngineImpl.EvaluationResultImpl, FormulaEngineImpl.FormulaAdjuster, FormulaEngineImpl.FormulaExpressionImpl
-
-
Field Summary
-
Fields inherited from class io.keikai.model.impl.sys.formula.FormulaEngineImpl
KEY_EVALUATORS, noCacheClassifier
-
Fields inherited from interface io.keikai.model.sys.formula.FormulaEngine
KEY_EXTERNAL_BOOK_NAMES, KEY_FORMULA_CACHE, KEY_SHEET_INDEXES
-
-
Constructor Summary
Constructors Constructor Description FormulaEngineEx()
-
Method Summary
-
Methods inherited from class io.keikai.model.impl.sys.formula.FormulaEngineImpl
clearCache, clearColumnCache, clearIterationValue, cloneSheet, cloneSheetPtgs, convertToEvaluationResult, convertToPOIFormulaType, evaluate, evaluateFormula, evaluateOnly, extend, getCloneSheetAdjuster, getMoveAdjuster, getRenameNameAdjuster, getRenameSheetAdjuster, getReorderSheetAdjuster, getResolvedValue, getShiftAdjuster, getTransposeAdjuster, move, parse, renameName, renameName, renameSheet, reorderSheetPtgs, shift, shouldNormalize, shrink, toDependRef, transpose, updateDependencyTable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.keikai.model.sys.formula.FormulaEngine
clearCache, clearColumnCache, cloneSheet, cloneSheetPtgs, evaluate, evaluateOnly, extend, move, parse, renameName, renameName, renameSheet, reorderSheetPtgs, shift, shrink, transpose, updateDependencyTable
-
-
-
-
Method Detail
-
getXelContext
protected Object getXelContext()
- Overrides:
getXelContext
in classFormulaEngineImpl
-
setXelContext
protected void setXelContext(Object ctx)
- Overrides:
setXelContext
in classFormulaEngineImpl
-
renderFormula
protected String renderFormula(ParsingBook parsingBook, String formula, Ptg[] tokens, boolean always)
- Overrides:
renderFormula
in classFormulaEngineImpl
-
parse
public Ptg[] parse(String formula, FormulaParsingWorkbook book, int sheetIndex, FormulaParseContext context)
- Overrides:
parse
in classFormulaEngineImpl
-
movePtgs
public FormulaExpression movePtgs(FormulaExpression fe, SheetRegion region, int rowOffset, int columnOffset, FormulaParseContext context)
Description copied from interface:FormulaEngine
Shift the formula that care on sheet and region for cells insertion, deletion, and paste- Specified by:
movePtgs
in interfaceFormulaEngine
- Overrides:
movePtgs
in classFormulaEngineImpl
- Returns:
-
shrinkPtgs
public FormulaExpression shrinkPtgs(FormulaExpression fe, SheetRegion srcRegion, boolean horizontal, FormulaParseContext context)
Description copied from interface:FormulaEngine
modifyFormulaExpression
for cells deletion- Specified by:
shrinkPtgs
in interfaceFormulaEngine
- Overrides:
shrinkPtgs
in classFormulaEngineImpl
- Returns:
-
extendPtgs
public FormulaExpression extendPtgs(FormulaExpression fe, SheetRegion srcRegion, boolean horizontal, FormulaParseContext context)
Description copied from interface:FormulaEngine
modifyFormulaExpression
for cells insertion- Specified by:
extendPtgs
in interfaceFormulaEngine
- Overrides:
extendPtgs
in classFormulaEngineImpl
- Returns:
-
shiftPtgs
public FormulaExpression shiftPtgs(FormulaExpression fe, int rowOffset, int columnOffset, FormulaParseContext context)
Description copied from interface:FormulaEngine
Shift the formula base on the offset- Specified by:
shiftPtgs
in interfaceFormulaEngine
- Overrides:
shiftPtgs
in classFormulaEngineImpl
- Returns:
-
transposePtgs
public FormulaExpression transposePtgs(FormulaExpression fe, int rowOrigin, int columnOrigin, FormulaParseContext context)
Description copied from interface:FormulaEngine
Transpose the formula base one the origin- Specified by:
transposePtgs
in interfaceFormulaEngine
- Overrides:
transposePtgs
in classFormulaEngineImpl
- Returns:
-
renameSheetPtgs
public FormulaExpression renameSheetPtgs(FormulaExpression fe, SBook targetBook, String oldSheetName, String newSheetName, FormulaParseContext context)
- Specified by:
renameSheetPtgs
in interfaceFormulaEngine
- Overrides:
renameSheetPtgs
in classFormulaEngineImpl
- Returns:
-
renameNamePtgs
public FormulaExpression renameNamePtgs(FormulaExpression fe, SBook targetBook, int sheetIndex, String oldName, String newName, FormulaParseContext context)
- Specified by:
renameNamePtgs
in interfaceFormulaEngine
- Overrides:
renameNamePtgs
in classFormulaEngineImpl
- Returns:
-
renameTableNameTablePtgs
public FormulaExpression renameTableNameTablePtgs(FormulaExpression fe, SBook book, String oldName, String newName, FormulaParseContext context)
- Specified by:
renameTableNameTablePtgs
in interfaceFormulaEngine
- Overrides:
renameTableNameTablePtgs
in classFormulaEngineImpl
- Returns:
-
getRenameTableAdjuster
protected FormulaEngineImpl.FormulaAdjuster getRenameTableAdjuster(String oldName, String newName)
-
renameColumnNameTablePtgs
public FormulaExpression renameColumnNameTablePtgs(FormulaExpression fe, STable table, String oldName, String newName, FormulaParseContext context)
- Specified by:
renameColumnNameTablePtgs
in interfaceFormulaEngine
- Overrides:
renameColumnNameTablePtgs
in classFormulaEngineImpl
- Returns:
-
getRenameColumnAdjuster
protected FormulaEngineImpl.FormulaAdjuster getRenameColumnAdjuster(String tableName, String oldName, String newName)
-
-