nl.pbemengine.engine.ng.tools
Class SuffixToken

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

public class SuffixToken
extends java.lang.Object
implements Token

A Token that consists of a sequence of numeric characters followed by a non-numeric one

Author:
Jeroen Steenbeeke

Constructor Summary
SuffixToken()
          Creates a new instance of SuffixToken
SuffixToken(char suffix)
          Creates a new instance of SuffixToken, with the non-numeric char equal to the indicated char
 
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

SuffixToken

public SuffixToken()
Creates a new instance of SuffixToken


SuffixToken

public SuffixToken(char suffix)
Creates a new instance of SuffixToken, with the non-numeric char equal to the indicated char

Parameters:
suffix - The Suffix character this SuffixToken should start with. Note, in order to keep your PBEM easy to use, you should only use Suffix characters available on a standard keyboard, and to avoid confusion, makes sure it is not numeric.
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.