Class Term.Op

java.lang.Object
org.esa.snap.core.jexp.Term
org.esa.snap.core.jexp.Term.Op
Direct Known Subclasses:
Term.Binary, Term.Cond, Term.Unary
Enclosing class:
Term

public abstract static class Term.Op extends Term
An abstract operation.
  • Field Details

    • name

      protected final String name
    • type

      protected final int type
    • args

      protected final Term[] args
  • Constructor Details

    • Op

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

    • 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