com.singularsys.jep.configurableparser.matchers

## Class WhiteSpaceTokenMatcher

- java.lang.Object
- - com.singularsys.jep.configurableparser.matchers.RegExpTokenMatcher
  - - com.singularsys.jep.configurableparser.matchers.WhiteSpaceTokenMatcher

- All Implemented Interfaces:
    TokenBuilder, TokenMatcher, java.io.Serializable

      public class WhiteSpaceTokenMatcher
      extends RegExpTokenMatcher

  Matches whitespace.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WhiteSpaceTokenMatcher(java.util.regex.Pattern pattern)`
    `WhiteSpaceTokenMatcher(java.lang.String regex)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Token` | `buildToken(java.lang.String s)` Builds a token following a successful match.
    `static WhiteSpaceTokenMatcher` | `defaultWhiteSpaceTokenMatcher()` Matches
    `void` | `init(Jep j)` Initialize the matcher when the Jep instance is known.

    - ### Methods inherited from class com.singularsys.jep.configurableparser.matchers.RegExpTokenMatcher

      `match`

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

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

- - ### Constructor Detail

    - #### WhiteSpaceTokenMatcher

          public WhiteSpaceTokenMatcher(java.lang.String regex)

    - #### WhiteSpaceTokenMatcher

          public WhiteSpaceTokenMatcher(java.util.regex.Pattern pattern)

  - ### Method Detail

    - #### buildToken

          public Token buildToken(java.lang.String s)

      Description copied from class: `RegExpTokenMatcher`
      Builds a token following a successful match. Note new objects should be created each time as error reporting information is later attached to tokens.
      Specified by:
        `buildToken` in interface `TokenBuilder`
      Specified by:
        `buildToken` in class `RegExpTokenMatcher`
      Parameters:
        `s` - String representing the completed matched token
      Returns:
        the appropriate type of token.

    - #### defaultWhiteSpaceTokenMatcher

          public static WhiteSpaceTokenMatcher defaultWhiteSpaceTokenMatcher()

      Matches
      Returns:
        a new TokenMatcher for white space tokens

    - #### init

          public void init(Jep j)

      Description copied from interface: `TokenMatcher`
      Initialize the matcher when the Jep instance is known.
      Parameters:
        `j` - Jep instance

Copyright © 2018 Singular Systems http://www.singularsys.com/jep