org.apache.poi.ss.formula.eval

## Class UnaryMinusEval

- java.lang.Object
- - org.apache.poi.ss.formula.functions.Fixed1ArgFunction
  - - org.apache.poi.ss.formula.eval.UnaryMinusEval

- All Implemented Interfaces:
    ArrayFunction, Function, Function1Arg

      public final class UnaryMinusEval
      extends Fixed1ArgFunction
      implements ArrayFunction

  Author:
    Amol S. Deshmukh < amolweb at ya hoo dot com >

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Function` | `instance`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ValueEval` | `evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0)` see `Function.evaluate(ValueEval[], int, int)`
    `ValueEval` | `evaluateArray(ValueEval[] args, int srcRowIndex, int srcColumnIndex)`

    - ### Methods inherited from class org.apache.poi.ss.formula.functions.Fixed1ArgFunction

      `evaluate`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.poi.ss.formula.functions.ArrayFunction

      `evaluateOneArrayArg, evaluateTwoArrayArgs`

- - ### Field Detail

    - #### instance

          public static final Function instance

  - ### Method Detail

    - #### evaluate

          public ValueEval evaluate(int srcRowIndex,
                                    int srcColumnIndex,
                                    ValueEval arg0)

      Description copied from interface: `Function1Arg`
      see `Function.evaluate(ValueEval[], int, int)`
      Specified by:
        `evaluate` in interface `Function1Arg`

    - #### evaluateArray

          public ValueEval evaluateArray(ValueEval[] args,
                                         int srcRowIndex,
                                         int srcColumnIndex)

      Specified by:
        `evaluateArray` in interface `ArrayFunction`
      Parameters:
        `args` - the evaluated function arguments. Empty values are represented with `BlankEval` or `MissingArgEval`, never `null`.
        `srcRowIndex` - row index of the cell containing the formula under evaluation
        `srcColumnIndex` - 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`.

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.