com.planeth.common.helper
Class WordReader

java.lang.Object
  extended bycom.planeth.common.helper.WordReader

public class WordReader
extends java.lang.Object

Helper to store strings, for excample from a character listener

Author:
Andreas Grässer, gal@planet-h.com.
created 01.11.2005

Constructor Summary
WordReader(int maxLetterTime)
          Constructor for WordReader.
 
Method Summary
 void deleteChar()
          Deletes the last char of the word
 java.lang.String getWord()
          returns the word
 void putChar(char chr)
          Appends a char to the word
 void resetWord()
          Resets (deletes) the word
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordReader

public WordReader(int maxLetterTime)
Constructor for WordReader.

Parameters:
maxLetterTime - max waitTime for the next letter. If exceeded, the word would be resetted
Method Detail

putChar

public void putChar(char chr)
Appends a char to the word

Parameters:
chr -

deleteChar

public void deleteChar()
Deletes the last char of the word


getWord

public java.lang.String getWord()
returns the word

Returns:
returns the word

resetWord

public void resetWord()
Resets (deletes) the word