org.argouml.util
Class TokenSep

java.lang.Object
  extended byorg.argouml.util.TokenSep

class TokenSep
extends java.lang.Object

Internal class for managing the delimiters in MyTokenizer. It's rather similar to CustomSeparator, but faster for short constant strings.


Field Summary
private  int _length
           
private  int _pattern
           
private  java.lang.String _string
           
 TokenSep next
           
 
Constructor Summary
TokenSep(java.lang.String str)
          Constructs a TokenSep that will match the String given in str.
 
Method Summary
 boolean addChar(char c)
          Called by MyTokenizer when a new character is processed in the sequence.
 java.lang.String getString()
          Gets this token.
 int length()
          Gets the length of this token.
 void reset()
          Called by MyTokenizer before starting scanning for a new token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

next

public TokenSep next

_string

private final java.lang.String _string

_length

private final int _length

_pattern

private int _pattern
Constructor Detail

TokenSep

public TokenSep(java.lang.String str)
Constructs a TokenSep that will match the String given in str.

Parameters:
str - The delimiter string.
Method Detail

addChar

public boolean addChar(char c)
Called by MyTokenizer when a new character is processed in the sequence. Returns true if we have found the delimiter.


reset

public void reset()
Called by MyTokenizer before starting scanning for a new token.


length

public int length()
Gets the length of this token.


getString

public java.lang.String getString()
Gets this token.



ArgoUML © 1996-2004 (20040316)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook