Class Term.Op

    • Field Detail

      • name

        protected final String name
      • type

        protected final int type
      • args

        protected final Term[] args
    • Constructor Detail

      • Op

        protected Op​(String name,
                     int type,
                     Term[] args)
    • Method Detail

      • getName

        public String getName()
      • getRetType

        public int getRetType()
        Description copied from class: Term
        Gets the term's "natural" return type.
        Specified by:
        getRetType in class Term
        Returns:
        the type, should always be one of the TYPE_X constants defined in this class.
      • getArgCount

        public int getArgCount()
      • getArg

        public Term getArg()
      • getArg

        public Term getArg​(int index)
      • getArgs

        public Term[] getArgs()
      • getChildren

        public Term[] getChildren()
        Description copied from class: Term
        Returns an array of terms which are children of this term.
        Overrides:
        getChildren in class Term
        Returns:
        an array of terms, never null but can be empty
      • toString

        public String toString()
        Description copied from class: Term
        Returns a string representation of this term which can be used for debugging.
        Specified by:
        toString in class Term
      • isConst

        public 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 int compare​(Term other)
        Specified by:
        compare in class Term