Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.singularsys.jep.configurableparser.matchers
Class NumberTokenMatcher

    java.lang.Object
      com.singularsys.jep.configurableparser.matchers.RegExpTokenMatcher
          com.singularsys.jep.configurableparser.matchers.NumberTokenMatcher

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

    public class NumberTokenMatcher

extends RegExpTokenMatcher

Matches numbers. The jep NumberFactory is used to create the number.

See Also:
  Serialized Form

Constructor Summary
`NumberTokenMatcher(java.util.regex.Pattern pattern)`
`NumberTokenMatcher(java.lang.String regex)`

Method Summary
`Token` | `buildToken(java.lang.String s)` Builds a token following a successful match.
`static NumberTokenMatcher` | `defaultNumberTokenMatcher()` Factory to create a matcher for decimal number without exponents
`static NumberTokenMatcher` | `exponentNumberTokenMatcher()` Factory to create a matcher for decimal number with or without exponents
`void` | `init(Jep jep)` 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

### NumberTokenMatcher

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

### NumberTokenMatcher

    public NumberTokenMatcher(java.lang.String regex)

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.

### defaultNumberTokenMatcher

    public static NumberTokenMatcher defaultNumberTokenMatcher()

  Factory to create a matcher for decimal number without exponents

  Returns:
    the matcher

### exponentNumberTokenMatcher

    public static NumberTokenMatcher exponentNumberTokenMatcher()

  Factory to create a matcher for decimal number with or without exponents

  Returns:
    the matcher

### init

    public void init(Jep jep)

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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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