org.apache.commons.collections.primitives.adapters.io
public class: ReaderCharIterator [javadoc |
source]
java.lang.Object
org.apache.commons.collections.primitives.adapters.io.ReaderCharIterator
All Implemented Interfaces:
CharIterator
Adapts a
Reader to the
CharIterator interface.
- version:
$ - Revision: 1.2 $ $Date: 2003/10/29 18:28:20 $
- author:
Rodney - Waldhoff
| Method from org.apache.commons.collections.primitives.adapters.io.ReaderCharIterator Summary: |
|---|
|
adapt, hasNext, next, remove |
| Method from org.apache.commons.collections.primitives.adapters.io.ReaderCharIterator Detail: |
public static CharIterator adapt(Reader in) {
return null == in ? null : new ReaderCharIterator(in);
}
|
public boolean hasNext() {
ensureNextAvailable();
return (-1 != next);
}
|
public char next() {
if(!hasNext()) {
throw new NoSuchElementException("No next element");
} else {
nextAvailable = false;
return (char)next;
}
}
|
public void remove() throws UnsupportedOperationException {
throw new UnsupportedOperationException("remove() is not supported here");
}
|