Class BooleanFunction

  • All Implemented Interfaces:
    Function

    public abstract class BooleanFunction
    extends java.lang.Object
    implements Function
    Here are the general rules concerning Boolean functions:
    1. Blanks are ignored (not either true or false)
    2. Strings are ignored if part of an area ref or cell ref, otherwise they must be 'true' or 'false'
    3. Numbers: 0 is false. Any other number is TRUE
    4. Areas: *all* cells in area are evaluated according to the above rules
    • Constructor Detail

      • BooleanFunction

        public BooleanFunction()
    • Method Detail

      • evaluate

        public final ValueEval evaluate​(ValueEval[] args,
                                        int srcRow,
                                        int srcCol)
        Specified by:
        evaluate in interface Function
        Parameters:
        args - the evaluated function arguments. Empty values are represented with BlankEval or MissingArgEval, never null.
        srcRow - row index of the cell containing the formula under evaluation
        srcCol - column index of the cell containing the formula under evaluation
        Returns:
        The evaluated result, possibly an ErrorEval, never null. Note - Excel uses the error code #NUM! instead of IEEE NaN, so when numeric functions evaluate to Double.NaN be sure to translate the result to ErrorEval.NUM_ERROR.