Class Term.Const

    • Constructor Detail

      • Const

        public Const()
    • Method Detail

      • evalB

        public boolean evalB​(EvalEnv env)
        Description copied from class: Term
        Evaluates this term to a boolean value.
        Specified by:
        evalB in class Term
        Parameters:
        env - the application dependant environment.
        Returns:
        a boolean value
      • toB

        protected abstract boolean toB()
      • evalI

        public int evalI​(EvalEnv env)
        Description copied from class: Term
        Evaluates this term to an int value.
        Specified by:
        evalI in class Term
        Parameters:
        env - the application dependant environment.
        Returns:
        an int value
      • toI

        protected abstract int toI()
      • evalD

        public double evalD​(EvalEnv env)
        Description copied from class: Term
        Evaluates this term to a double value.
        Specified by:
        evalD in class Term
        Parameters:
        env - the application dependant environment.
        Returns:
        a double value
      • toD

        protected abstract double toD()
      • evalS

        public String evalS​(EvalEnv env)
        Description copied from class: Term
        Evaluates this term to a String value. The default implementation simply returns the value of Term.toString().
        Overrides:
        evalS in class Term
        Parameters:
        env - the application dependant environment.
        Returns:
        a String value
      • toS

        protected abstract String toS()
      • isConst

        public final boolean isConst()
        Specified by:
        isConst in class Term
        Returns:
        true, if this term evaluates to the same constant value regardless of any EvalEnv, even null.
      • compare

        public final int compare​(Term other)
        Specified by:
        compare in class Term
      • pre

        public int pre()
        Specified by:
        pre in class Term