Package calc

Class Expression

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int i  
    • Constructor Summary

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

      Modifier and Type Method Description
      abstract double accept​(java.lang.String expression)  
      protected double evaluate​(java.lang.String expression)
      Evaluates an expression as a level deeper than the current one in the expression tree,
      • Methods inherited from class java.lang.Object

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

      • i

        protected final int i
    • Constructor Detail

      • Expression

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

      • evaluate

        protected final double evaluate​(java.lang.String expression)
        Evaluates an expression as a level deeper than the current one in the expression tree,
        Parameters:
        expression - Some math expression.
        Returns:
        Evaluated result.
      • accept

        public abstract double accept​(java.lang.String expression)
        Parameters:
        expression - Some math expression.
        Returns:
        Evaluated result.