Package com.singularsys.jep.standard

# Class UncheckedEvaluator

java.lang.Object
com.singularsys.jep.standard.UncheckedEvaluator

All Implemented Interfaces:
  `Evaluator`, `JepComponent`, `ParserVisitor`, `Serializable`

public final class UncheckedEvaluator extends Object implements Evaluator, ParserVisitor
An evaluator which does fewer checks on values with a 5% faster speed.

Since:
  3.5
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UncheckedEvaluator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `eval(Node node)`
  Evaluates a sub expression.
  `Object`
  `evaluate(Node node)`
  Main entry point, evaluates a node and returns and object with the value of the node.
  `JepComponent`
  `getLightWeightInstance()`
  Gets a light-weight instance suitable for using in multiple threads.
  `void`
  `init(Jep jep)`
  Initialize the component.
  `Object`
  `visit(ASTConstant node, Object data)`
  `Object`
  `visit(ASTFunNode node, Object data)`
  `Object`
  `visit(ASTOpNode node, Object data)`
  `Object`
  `visit(ASTVarNode node, Object data)`
  `Object`
  `visitConstant(Node node)`
  `Object`
  `visitVar(Node node)`

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

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

  ### Methods inherited from interface com.singularsys.jep.Evaluator

  `eval`

- ## Constructor Details

  - ### UncheckedEvaluator

    public UncheckedEvaluator()

- ## Method Details

  - ### init

    public void init(Jep jep)
    Description copied from interface: `JepComponent`
    Initialize the component. This method is called whenever a component is added to Jep. Hence, it allows components to keep track of the other components they may rely on.
    Specified by:
      `init` in interface `JepComponent`
    Parameters:
      `jep` - the current Jep instance

  - ### eval

    public Object eval(Node node) throws EvaluationException
    Description copied from interface: `Evaluator`
    Evaluates a sub expression. This method can be called by PostfixMathCommands which implement `CallbackEvaluationI`
    Specified by:
      `eval` in interface `Evaluator`
    Parameters:
      `node` - node to evaluate
    Returns:
      The value after evaluating the sub expression.
    Throws:
      `EvaluationException` - if errors occur during evaluation;

  - ### evaluate

    public Object evaluate(Node node) throws EvaluationException
    Description copied from interface: `Evaluator`
    Main entry point, evaluates a node and returns and object with the value of the node.
    Specified by:
      `evaluate` in interface `Evaluator`
    Parameters:
      `node` - node to evaluate
    Returns:
      value after evaluation
    Throws:
      `EvaluationException` - if errors occur during evaluation;

  - ### visit

    public Object visit(ASTConstant node, Object data) throws EvaluationException
    Specified by:
      `visit` in interface `ParserVisitor`
    Throws:
      `EvaluationException`

  - ### visitConstant

    public Object visitConstant(Node node)

  - ### visit

    public Object visit(ASTVarNode node, Object data) throws EvaluationException
    Specified by:
      `visit` in interface `ParserVisitor`
    Throws:
      `EvaluationException`

  - ### visitVar

    public Object visitVar(Node node)

  - ### visit

    public Object visit(ASTFunNode node, Object data) throws EvaluationException
    Specified by:
      `visit` in interface `ParserVisitor`
    Throws:
      `EvaluationException`

  - ### visit

    public Object visit(ASTOpNode node, Object data) throws EvaluationException
    Specified by:
      `visit` in interface `ParserVisitor`
    Throws:
      `EvaluationException`

  - ### getLightWeightInstance

    public JepComponent getLightWeightInstance()
    Description copied from interface: `JepComponent`
    Gets a light-weight instance suitable for using in multiple threads.
    Specified by:
      `getLightWeightInstance` in interface `JepComponent`
    Returns:
      a new FastEvaluator