Class Calculator

java.lang.Object
org.djutils.eval.Calculator

public class Calculator extends Object
Calculator.java. Demonstrates use of the Eval class.

Copyright (c) 2023-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.

Author:
Peter Knoppers
  • Constructor Details

    • Calculator

      public Calculator()
  • Method Details

    • main

      public static void main(String... args)
      Demonstrate the Eval class. Program entry point.
      Parameters:
      args - String ...; the command line arguments
    • doEval

      public static void doEval(String expression)
      Print expression followed by the result.
      Parameters:
      expression - String; expression to evaluate
    • doEval

      public static void doEval(String expression, RetrieveValue valuePool)
      Print expression followed by the result.
      Parameters:
      expression - String; the expression to evaluate
      valuePool - RetrieveValue; variable pool