Interface Function

All Known Implementing Classes:
MultiOperandNumericFunction, TextFunction

public interface Function
User-implementable interface for plugging custom formula functions into Keikai's formula engine.

To register a custom function, declare a static method with the signature (ValueEval[], int, int) → ValueEval and bind it via an XEL processing instruction (see Keikai migration guide for Keikai 7.0). The two int arguments are the 1-based row and 0-based column index of the cell that hosts the formula being evaluated.

Helper base classes TextFunction and MultiOperandNumericFunction wrap common evaluation patterns (text args, multi-operand numeric accumulation) and are recommended for most custom functions.

Replaces org.apache.poi.ss.formula.functions.Function from the Apache POI fork. The shape is intentionally identical so that custom-function migration is a mechanical package rename.

Since:
7.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(ValueEval[] args, int srcCellRow, int srcCellCol)
    Evaluate this function with the supplied (already-evaluated) argument values.
  • Method Details

    • evaluate

      ValueEval evaluate(ValueEval[] args, int srcCellRow, int srcCellCol)
      Evaluate this function with the supplied (already-evaluated) argument values.
      Parameters:
      args - evaluated function arguments; never null and never contains null entries
      srcCellRow - 0-based row index of the cell containing the formula
      srcCellCol - 0-based column index of the cell containing the formula
      Returns:
      the result as a ValueEval; return an ErrorEval for error cases