org.codehaus.groovy.syntax

## Class TokenUtil

- java.lang.Object
- - org.codehaus.groovy.syntax.TokenUtil

-     public class TokenUtil
      extends Object

  Utility methods for working with Tokens.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Optional<Token>` | `asAssignment(int op)`
    `static int` | `removeAssignment(int op)` Removes the assignment portion of a given token.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### asAssignment

          public static Optional<Token> asAssignment(int op)

    - #### removeAssignment

          public static int removeAssignment(int op)

      Removes the assignment portion of a given token. If the given token is not an operator with assignment, the given token is returned.
      Parameters:
        `op` - token for which to remove assignment
      Returns:
        token without assignment, or the original token if it was not an assignment operator