org.apache.commons.collections.primitives.adapters
Class IntIteratorIterator

java.lang.Object
  extended by org.apache.commons.collections.primitives.adapters.IntIteratorIterator
All Implemented Interfaces:
Iterator

public class IntIteratorIterator
extends Object
implements Iterator

Adapts an IntIterator to the Iterator interface.

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

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

Constructor Summary
IntIteratorIterator(IntIterator iterator)
          Creates an Iterator wrapping the specified IntIterator.
 
Method Summary
 boolean hasNext()
           
 Object next()
           
 void remove()
           
static Iterator wrap(IntIterator iterator)
          Create an Iterator wrapping the specified IntIterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntIteratorIterator

public IntIteratorIterator(IntIterator iterator)
Creates an Iterator wrapping the specified IntIterator.

See Also:
wrap(org.apache.commons.collections.primitives.IntIterator)
Method Detail

wrap

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

Parameters:
iterator - the (possibly null) IntIterator to wrap
Returns:
an Iterator wrapping the given iterator, or null when iterator is null.

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator


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