org.apache.commons.collections.primitives.adapters.io
Class ReaderCharIterator

java.lang.Object
  extended by org.apache.commons.collections.primitives.adapters.io.ReaderCharIterator
All Implemented Interfaces:
CharIterator

public class ReaderCharIterator
extends Object
implements CharIterator

Adapts a Reader to the CharIterator interface.

Version:
$Revision: 480462 $ $Date: 2006-11-29 09:15:00 +0100 (Wed, 29 Nov 2006) $
Author:
Rodney Waldhoff

Constructor Summary
ReaderCharIterator(Reader in)
           
 
Method Summary
static CharIterator adapt(Reader in)
           
 boolean hasNext()
          Returns true iff I have more elements.
 char next()
          Returns the next element in me.
 void remove()
          Not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReaderCharIterator

public ReaderCharIterator(Reader in)
Method Detail

adapt

public static CharIterator adapt(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 UnsupportedOperationException
Not supported.

Specified by:
remove in interface CharIterator
Throws:
UnsupportedOperationException


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.