Package calc

Class Constant


  • public class Constant
    extends Expression
    Constant evaluator.
    • Constructor Summary

      Constructors 
      Constructor Description
      Constant​(int i)  
    • Method Summary

      Modifier and Type Method Description
      double accept​(java.lang.String expression)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Constant

        public Constant​(int i)
        Parameters:
        i - Expression depth.
    • Method Detail

      • accept

        public double accept​(java.lang.String expression)
        Specified by:
        accept in class Expression
        Parameters:
        expression - Some math expression.
        Returns:
        Evaluated result.