Class ZKUDFFinder
POI removal Keikai-native rewrite. The registry now holds
Keikai's FreeRefFunction (signature
(ValueEval[], Object) -> ValueEval) — POI's
org.apache.poi.ss.formula.functions.FreeRefFunction is gone.
Customer migration from pre-Phase-7:
// Before — POI types:
import org.apache.poi.ss.formula.eval.NumberEval;
ZKUDFFinder.putFunction("DOUBLE", (args, ec) -> new NumberEval(42.0));
// After — Keikai-native types:
import io.keikai.range.formula.NumberEval;
ZKUDFFinder.putFunction("DOUBLE", (args, ec) -> new NumberEval(42.0));
The two API shapes are identical apart from the import package; every
customer UDF body remains unchanged.- Author:
- henrichen, dennischen
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfindFunction(String name) Resolve a function name to its registered implementation.static voidputFunction(String name, FreeRefFunction fn) Register a custom user-defined function.static voidputKeikaiFunction(String name, FreeRefFunction fn) Deprecated.
-
Field Details
-
instance
-
-
Method Details
-
putFunction
Register a custom user-defined function. Replaces any existing registration of the same name.POI removal: the parameter type is now
FreeRefFunction— Keikai-native. Customer code that previously used POI'sorg.apache.poi.ss.formula.functions.FreeRefFunctionrecompiles after a one-line import change toio.keikai.range.formula.FreeRefFunction(and the same package change for the result type — see class javadoc).- Parameters:
name- function name (case-insensitive at lookup; stored verbatim)fn- the function implementation
-
putKeikaiFunction
Deprecated.Phase-7 alias forputFunction(String, FreeRefFunction); the method-name distinction was needed only while the POI-typed overload coexisted. Customers can call the plainputFunction(java.lang.String, io.keikai.range.formula.FreeRefFunction)form. -
findFunction
Resolve a function name to its registered implementation. Returnsnullwhen no entry matches.The lookup strips the Excel 2010+
_xlfn.prefix and falls back toELEvalFunction(TLD lookup) for unknown names. An entry that resolves tonull(an explicit "unsupported" placeholder, e.g.PHONETIC) returns theUNSUPPORTED_FUNCTIONsentinel which surfaces#NAME?.
-
putFunction(String, FreeRefFunction); the method-name distinction was needed only while the POI-typed overload coexisted.