/** * An interface for iterators over the chars in a * string. It is expected that implementers will have a * constructor that takes a string parameter--the string * over which to iterate. */ public interface CharIter { /** * Test whether there are more characters to go. * @return true if more chars (next can be called) */ boolean hasNext(); /** * Get the next char in the string. This should be * called only if there is a next char--see hasNext. * @return the next char */ char next(); }