RegExpSymbol (API documentation of hlt.language packages)
Date: 2013-01-30

hlt.language.util

## Class RegExpSymbol

- java.lang.Object
- - hlt.language.util.RegExp
  - - hlt.language.util.RegExpSymbol

-     public class RegExpSymbol
      extends RegExp

  This class is a concrete implementation of the abstract class `RegExp`. It is meant to represent an alphabet symbol. It is simply a wrapper for an object to be used as an alphabet symbol in a RE. Alphabet symbols are uniquely represented. So this also provides a factory to return a unique symbol from a specified object (using `equals` on the objects). Hence, it has no public constructor.
  Version:
    Last modified on Thu Oct 18 22:48:18 2012 by hak
  Author:
    Hassan Aït-Kaci
  Copyright:
    © Hassan Aït-Kaci

- - ### Field Summary

    - ### Fields inherited from class hlt.language.util.RegExp

      `BINARY_EXP, CHOICE_EXP, CONCAT_EXP, EMPTY, EMPTY_EXP, OPTION_EXP, PLUS_EXP, POWER_EXP, RANGE_EXP, STAR_EXP, SYMBOL_EXP, UNARY_EXP`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `RegExp` | `deepCopy()` This returns a deep copy of this `RegExp`.
    `boolean` | `equals(java.lang.Object other)` Returns `true` iff the specified object is a `RegExpSymbol` that has the same name as this.
    `static RegExpSymbol` | `get(java.lang.Object object)` This is the public factory method for creating `RegExpSymbol` objects.
    `java.lang.String` | `name()` Returns this `RegExpSymbol`'s name as a unique id.
    `RegExp` | `normalize()` Returns this `RegExpSymbol` as its own normal form.
    `java.lang.Object` | `object()` Returns this `RegExpSymbol`'s object.
    `void` | `setName(java.lang.String name)` Sets the name of this `RegExpSymbol` to the specified string.
    `RegExp` | `shallowCopy()` This returns a shallow copy of this `RegExp`.
    `java.lang.String` | `toString()` Returns a printable form for this `RegExpSymbol`.
    `int` | `type()` This returns the specific type identifying this `RegExp`.

    - ### Methods inherited from class hlt.language.util.RegExp

      `cleanup, isBinary, isChoice, isConcat, isEmpty, isLexLess, isOption, isPlus, isPower, isRange, isStar, isSymbol, isUnary, normEquals, noTrace, tag, toggleTrace, toNormalString, trace, tracing`

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

      `getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### shallowCopy

          public final RegExp shallowCopy()

      Description copied from class: `RegExp`
      This returns a shallow copy of this `RegExp`.
      Specified by:
        `shallowCopy` in class `RegExp`

    - #### deepCopy

          public final RegExp deepCopy()

      Description copied from class: `RegExp`
      This returns a deep copy of this `RegExp`.
      Specified by:
        `deepCopy` in class `RegExp`

    - #### type

          public final int type()

      Description copied from class: `RegExp`
      This returns the specific type identifying this `RegExp`.
      Specified by:
        `type` in class `RegExp`

    - #### object

          public final java.lang.Object object()

      Returns this `RegExpSymbol`'s object.

    - #### setName

          public final void setName(java.lang.String name)

      Sets the name of this `RegExpSymbol` to the specified string.

    - #### name

          public final java.lang.String name()

      Returns this `RegExpSymbol`'s name as a unique id.

    - #### get

          public static RegExpSymbol get(java.lang.Object object)

      This is the public factory method for creating `RegExpSymbol` objects. It returns a canonical `RegExpSymbol` wrapper for the specified object. If the argument is `null`, this returns the canonical `EMPTY` `RegExpSymbol`. Otherwise, it will return the same `RegExpSymbol` for `equals`objects.``

    - #### normalize

          public final RegExp normalize()

      Returns this `RegExpSymbol` as its own normal form.
      Specified by:
        `normalize` in class `RegExp`

    - #### equals

          public final boolean equals(java.lang.Object other)

      Returns `true` iff the specified object is a `RegExpSymbol` that has the same name as this.
      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public final java.lang.String toString()

      Returns a printable form for this `RegExpSymbol`.
      Overrides:
        `toString` in class `java.lang.Object`