Arithmetic
Class StringReader

java.lang.Object
  |
  +--Arithmetic.StringReader

public class StringReader
extends java.lang.Object

StringReader holds a string and gives away its characters one by one


Field Summary
static char END_CHAR
          Field StringReader.END_CHAR is the name of the character that is returned when there are no more characters to extract from the string.
 
Constructor Summary
StringReader(java.lang.String s)
          Constructor StringReader accepts the string to be disassembled.
 
Method Summary
 char nextChar()
          nextChar extracts the next unread character from the string it holds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

END_CHAR

public static char END_CHAR
Field StringReader.END_CHAR is the name of the character that is returned when there are no more characters to extract from the string.
Constructor Detail

StringReader

public StringReader(java.lang.String s)
Constructor StringReader accepts the string to be disassembled.
Parameters:
s - - the string
Method Detail

nextChar

public char nextChar()
nextChar extracts the next unread character from the string it holds
Returns:
the next unread char, or return StringReader.END_CHAR if there are no more unread characters.