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

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

public class LongIteratorIterator
extends java.lang.Object
implements java.util.Iterator

Adapts an LongIterator to the Iterator interface.

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

Since:
Commons Primitives 1.0
Version:
$Revision: 1.3 $ $Date: 2003/10/16 20:49:39 $
Author:
Rodney Waldhoff

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

Field Detail

_iterator

private LongIterator _iterator
Constructor Detail

LongIteratorIterator

public LongIteratorIterator(LongIterator iterator)
Creates an Iterator wrapping the specified LongIterator.

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

wrap

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

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

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator


Copyright (c) 2002-2003 - Apache Software Foundation