com.singularsys.jep.misc.functions

## Class ConstantFunction

- java.lang.Object
- - com.singularsys.jep.functions.PostfixMathCommand
  - - com.singularsys.jep.functions.NullaryFunction
    - - com.singularsys.jep.misc.functions.ConstantFunction

- All Implemented Interfaces:
    PostfixMathCommandI, java.io.Serializable

      public class ConstantFunction
      extends NullaryFunction

  Functions which always return a constant value.
  Author:
    Richard Morris
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand

      `curNumberOfParameters, name, NaN, numberOfParameters`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConstantFunction(java.lang.Object value)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `eval()` Evaluate the function
    `java.lang.Object` | `getValue()`

    - ### Methods inherited from class com.singularsys.jep.functions.NullaryFunction

      `run`

    - ### Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand

      `asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString`

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

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

- - ### Constructor Detail

    - #### ConstantFunction

          public ConstantFunction(java.lang.Object value)

      Parameters:
        `value` - the value returned by the function

  - ### Method Detail

    - #### eval

          public java.lang.Object eval()
                                throws EvaluationException

      Description copied from class: `NullaryFunction`
      Evaluate the function
      Specified by:
        `eval` in class `NullaryFunction`
      Returns:
        value of the function
      Throws:
        `EvaluationException`

    - #### getValue

          public java.lang.Object getValue()

Copyright © 2018 Singular Systems http://www.singularsys.com/jep