org.apache.commons.collections.primitives.adapters

Class CharIteratorIterator

public class CharIteratorIterator extends Object implements Iterator

Adapts an CharIterator to the java.util.Iterator Iterator interface.

This implementation delegates most methods to the provided CharIterator implementation in the "obvious" way.

Since: Commons Primitives 1.0

Version: $Revision: 1.3 $ $Date: 2003/10/16 20:49:38 $

Author: Rodney Waldhoff

Field Summary
CharIterator_iterator
Constructor Summary
CharIteratorIterator(CharIterator iterator)
Creates an Iterator Iterator wrapping the specified CharIterator.
Method Summary
booleanhasNext()
Objectnext()
voidremove()
static Iteratorwrap(CharIterator iterator)
Create an Iterator Iterator wrapping the specified CharIterator.

Field Detail

_iterator

private CharIterator _iterator

Constructor Detail

CharIteratorIterator

public CharIteratorIterator(CharIterator iterator)
Creates an Iterator Iterator wrapping the specified CharIterator.

See Also: CharIteratorIterator

Method Detail

hasNext

public boolean hasNext()

next

public Object next()

remove

public void remove()

wrap

public static Iterator wrap(CharIterator iterator)
Create an Iterator Iterator wrapping the specified CharIterator. When the given iterator is null, returns null.

Parameters: iterator the (possibly null) CharIterator to wrap

Returns: an Iterator Iterator wrapping the given iterator, or null when iterator is null.

Copyright (c) 2002-2003 - Apache Software Foundation