Package com.singularsys.jep.configurableparser.tokens

# Class OperatorToken

java.lang.Object
com.singularsys.jep.configurableparser.tokens.Token
com.singularsys.jep.configurableparser.tokens.OperatorToken

All Implemented Interfaces:
  `Serializable`

public class OperatorToken extends Token
A token representing an operator. The operator may be overloaded representing prefix, suffix, binary infix and ternary operators. In Jep 3.5 and later there is one OperatorToken for each alternate symbol.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OperatorToken(List<Operator> ops, String symbol)`
  Creates the basic token.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Token`
  `cloneToken()`
  Creates a copy of this token
  `Operator`
  `getBinaryOp()`
  If this symbol represents a binary infix operator then return it.
  `Operator`
  `getPrefixOp()`
  `Operator`
  `getSuffixOp()`
  `Operator`
  `getTernaryOp()`
  `boolean`
  `isBinary()`
  `boolean`
  `isOperator()`
  `boolean`
  `isPrefix()`
  `boolean`
  `isSuffix()`
  `boolean`
  `isTernary()`
  `String`
  `toString()`

  ### Methods inherited from class com.singularsys.jep.configurableparser.tokens.Token

  `equals, getColumnNumber, getLength, getLineNumber, getSource, hashCode, isComment, isFunction, isIdentifier, isImplicitMulRhs, isNumber, isString, isSymbol, isTerminal, isWhiteSpace, setPosition`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### OperatorToken

    public OperatorToken(List<Operator> ops, String symbol)
    Creates the basic token. Copies of this token will be created during parsing.
    Parameters:
      `ops` - list of operators this matches
      `symbol` - text to be matched
    Since:
      Jep 3.5

- ## Method Details

  - ### getBinaryOp

    public Operator getBinaryOp()
    If this symbol represents a binary infix operator then return it.
    Returns:
      the binary op or null if no binary is operator specified.

  - ### getPrefixOp

    public Operator getPrefixOp()

  - ### getSuffixOp

    public Operator getSuffixOp()

  - ### getTernaryOp

    public Operator getTernaryOp()

  - ### isOperator

    public boolean isOperator()
    Overrides:
      `isOperator` in class `Token`

  - ### isBinary

    public boolean isBinary()
    Overrides:
      `isBinary` in class `Token`

  - ### isPrefix

    public boolean isPrefix()
    Overrides:
      `isPrefix` in class `Token`

  - ### isSuffix

    public boolean isSuffix()
    Overrides:
      `isSuffix` in class `Token`

  - ### isTernary

    public boolean isTernary()
    Overrides:
      `isTernary` in class `Token`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Token`

  - ### cloneToken

    public Token cloneToken()
    Creates a copy of this token
    Returns:
      a copy of the token