nl.pbemengine.engine.ng.tools
Class ConstantToken

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

public class ConstantToken
extends java.lang.Object
implements Token

A Token matching one specific sequence of characters

Author:
Jeroen Steenbeeke

Constructor Summary
ConstantToken(boolean ignoreCase, java.lang.String word)
          Creates a new instance of ConstantToken
 
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

ConstantToken

public ConstantToken(boolean ignoreCase,
                     java.lang.String word)
Creates a new instance of ConstantToken

Parameters:
ignoreCase - Should be set to true if the checking should not be case-sensitive
word - 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.