org.apache.commons.collections.primitives.adapters.io
Class ReaderCharIterator
java.lang.Object
org.apache.commons.collections.primitives.adapters.io.ReaderCharIterator
- All Implemented Interfaces:
- CharIterator
public class ReaderCharIterator
- extends java.lang.Object
- implements CharIterator
Adapts a Reader
to the CharIterator
interface.
- Version:
- $Revision: 1.2 $ $Date: 2003/10/29 18:28:20 $
- Author:
- Rodney Waldhoff
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
reader
private java.io.Reader reader
nextAvailable
private boolean nextAvailable
next
private int next
ReaderCharIterator
public ReaderCharIterator(java.io.Reader in)
adapt
public static CharIterator adapt(java.io.Reader in)
hasNext
public boolean hasNext()
- Description copied from interface:
CharIterator
- Returns
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.)
- Specified by:
hasNext
in interface CharIterator
- Returns:
true
iff I have more elements
next
public char next()
- Description copied from interface:
CharIterator
- Returns the next element in me.
- Specified by:
next
in interface CharIterator
- Returns:
- the next element in me
remove
public void remove()
throws java.lang.UnsupportedOperationException
- Not supported.
- Specified by:
remove
in interface CharIterator
- Throws:
java.lang.UnsupportedOperationException
ensureNextAvailable
private void ensureNextAvailable()
readNext
private void readNext()
Copyright (c) 2002-2003 - Apache Software Foundation