Class Operator

java.lang.Object
org.scijava.parse.Token
org.scijava.parse.Operator
All Implemented Interfaces:
Comparable<Operator>
Direct Known Subclasses:
Function, Group

public class Operator extends Token implements Comparable<Operator>
A mathematical operator is a "verb": a special infix (in the case of binary or greater arity) or prefix (in the case of unary) symbol which defines a relation between "nouns" (i.e.: literals and variables).
Author:
Curtis Rueden
  • Constructor Details

  • Method Details

    • getArity

      public int getArity()
      1 for unary, 2 for binary, etc.
    • getAssociativity

      public Operator.Associativity getAssociativity()
    • isLeftAssociative

      public boolean isLeftAssociative()
    • isRightAssociative

      public boolean isRightAssociative()
    • isInfix

      public boolean isInfix()
      True iff the operator is an infix operator (e.g., a-b).
    • isPrefix

      public boolean isPrefix()
      True iff the operator is a prefix operator (e.g., -a).
    • isPostfix

      public boolean isPostfix()
      True iff the operator is a postfix operator (e.g., a').
    • getPrecedence

      public double getPrecedence()
    • instance

      public Operator instance()
    • compareTo

      public int compareTo(Operator that)
      Specified by:
      compareTo in interface Comparable<Operator>