Interface FreeRefFunction

All Known Implementing Classes:
ELEval, ELEvalFunction
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface FreeRefFunction
User-implementable functional interface for plugging custom formula functions into Keikai's formula engine that need access to the evaluation context (cell position, sheet) — the equivalent of POI's org.apache.poi.ss.formula.functions.FreeRefFunction.

POI removal Keikai-native mirror. Existing customer UDFs registered as POI FreeRefFunction via ZKUDFFinder.putFunction(String, org.apache.poi.ss.formula.functions.FreeRefFunction) keep working — those go through Strategy 0 in UdfBridge.callUdfJson(long, java.lang.String, java.lang.String). New customer UDFs are encouraged to use this Keikai-native form via the overload ZKUDFFinder.putFunction(String, FreeRefFunction) so the customer's UDF code does not depend on POI.

The Object ec second parameter is opaque under the Rust formula path — pass null when invoking; future Keikai-native evaluation contexts will fill in cell-position information.

Since:
7.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(ValueEval[] args, Object ec)
    Evaluate the user function.
  • Method Details

    • evaluate

      ValueEval evaluate(ValueEval[] args, Object ec)
      Evaluate the user function.
      Parameters:
      args - the parsed argument values (numeric / string / boolean / error / blank Eval instances)
      ec - opaque evaluation context (currently null under the Rust path; future Keikai-native contexts will pass cell position info)
      Returns:
      the function result; null or BlankEval.INSTANCE for an empty result.