Package io.keikai.range.formula
Class OperandResolver
java.lang.Object
io.keikai.range.formula.OperandResolver
Coercion helpers for
ValueEval operands. Mirror of Apache POI's
org.apache.poi.ss.formula.eval.OperandResolver — only the
methods Keikai actually uses are implemented (single-value extraction
+ scalar coercion to String / int / double).
POI removal Keikai-native helper. Lets the kkex formula-bridge code (ELEval / ELEvalFunction) coerce custom-function arguments without pulling POI in.
- Since:
- 7.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic doubleCoercevto a double.static intCoercevto an int (Math.floor — matches POI's OperandResolver).static StringCoercevto a string.static ValueEvalgetSingleValue(ValueEval arg, int rowIndex, int colIndex) Returns a single scalar fromarg.
-
Method Details
-
getSingleValue
public static ValueEval getSingleValue(ValueEval arg, int rowIndex, int colIndex) throws EvaluationException Returns a single scalar fromarg. For area / ref types this picks the element at(rowIndex, colIndex)(matching POI's implicit-intersection behaviour for single-cell input). For scalar typesargis returned as-is.- Throws:
EvaluationException- with#VALUE!for multi-cell areas that do not intersect the formula cell row/col.
-
coerceValueToString
Coercevto a string. Errors propagate asEvaluationException.- Throws:
EvaluationException
-
coerceValueToDouble
Coercevto a double.- Throws:
EvaluationException
-
coerceValueToInt
Coercevto an int (Math.floor — matches POI's OperandResolver).- Throws:
EvaluationException
-