nl.pbemengine.engine.ng.tools
Class EnumToken

java.lang.Object
  extended by nl.pbemengine.engine.ng.tools.EnumToken
All Implemented Interfaces:
Token

public class EnumToken
extends java.lang.Object
implements Token

A Token matching any of a series of words

Author:
Jeroen Steenbeeke

Constructor Summary
EnumToken(boolean ignoreCase, java.lang.String... words)
          Creates a new instance of EnumToken
 
Method Summary
 java.lang.Object match(LineParser p)
          Sees if the given LineParser's content contains this token
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnumToken

public EnumToken(boolean ignoreCase,
                 java.lang.String... words)
Creates a new instance of EnumToken

Parameters:
ignoreCase - Set this to true if the parser should ignore case sensitivity
words - The words that are valid possibilities for this token
Method Detail

match

public java.lang.Object match(LineParser p)
Sees if the given LineParser's content contains this token

Specified by:
match in interface Token
Parameters:
p - The LineParser
Returns:
A TokenValue object if it matches, or null otherwise

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of the object


Copyright © 2008. All Rights Reserved.