public class ReaderCharIterator extends java.lang.Object implements CharIterator
Reader
to the CharIterator
interface.Modifier and Type | Field and Description |
---|---|
private int |
next |
private boolean |
nextAvailable |
private java.io.Reader |
reader |
Constructor and Description |
---|
ReaderCharIterator(java.io.Reader in) |
Modifier and Type | Method and Description |
---|---|
static CharIterator |
adapt(java.io.Reader in) |
private void |
ensureNextAvailable() |
boolean |
hasNext()
Returns
true iff I have more elements. |
char |
next()
Returns the next element in me.
|
private void |
readNext() |
void |
remove()
Not supported.
|
private java.io.Reader reader
private boolean nextAvailable
private int next
public static CharIterator adapt(java.io.Reader in)
public boolean hasNext()
CharIterator
true
iff I have more elements.
(In other words, returns true
iff
a subsequent call to next
will return
an element rather than throwing an exception.)hasNext
in interface CharIterator
true
iff I have more elementspublic char next()
CharIterator
next
in interface CharIterator
public void remove() throws java.lang.UnsupportedOperationException
remove
in interface CharIterator
java.lang.UnsupportedOperationException
private void ensureNextAvailable()
private void readNext()
Copyright (c) 2002-2003 - Apache Software Foundation