Class Term.Cond

  • Enclosing class:
    Term

    public static final class Term.Cond
    extends Term.Op
    The conditional operation
    b-term ? term : term
    • Field Detail

      • arg1

        protected final Term arg1
      • arg2

        protected final Term arg2
      • arg3

        protected final Term arg3
    • Constructor Detail

      • Cond

        public Cond​(int type,
                    Term arg1,
                    Term arg2,
                    Term arg3)
    • 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
      • 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
      • 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
      • accept

        public <T> T accept​(TermVisitor<T> visitor)
        Description copied from class: Term
        Visitor support.
        Specified by:
        accept in class Term
        Parameters:
        visitor - A visitor.
      • pre

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