PCJ API
Version 1.2

bak.pcj.adapter
Class DoubleIteratorToIteratorAdapter

java.lang.Object
  extended bybak.pcj.adapter.DoubleIteratorToIteratorAdapter
All Implemented Interfaces:
Iterator

public class DoubleIteratorToIteratorAdapter
extends Object
implements Iterator

This class represents adaptions of primitive iterators over double values to Java Collections Framework iterators.

Since:
1.0

Constructor Summary
DoubleIteratorToIteratorAdapter(DoubleIterator iterator)
          Creates a new adaption to an iterator from an iterator over double values.
 
Method Summary
 boolean hasNext()
          Indicates whether more values can be returned by this iterator.
 Object next()
          Returns the next value of this iterator.
 void remove()
          Removes the last value returned from the underlying collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleIteratorToIteratorAdapter

public DoubleIteratorToIteratorAdapter(DoubleIterator iterator)
Creates a new adaption to an iterator from an iterator over double values.

Parameters:
iterator - the underlying iterator.
Throws:
NullPointerException - if iterator is null.
Method Detail

hasNext

public boolean hasNext()
Indicates whether more values can be returned by this iterator.

Specified by:
hasNext in interface Iterator
Returns:
true if more values can be returned by this iterator; returns false otherwise.
See Also:
next()

next

public Object next()
Returns the next value of this iterator.

Specified by:
next in interface Iterator
Returns:
the next value of this iterator.
Throws:
NoSuchElementException - if no more elements are available from this iterator.
See Also:
hasNext()

remove

public void remove()
Removes the last value returned from the underlying collection.

Specified by:
remove in interface Iterator
Throws:
UnsupportedOperationException - if removal is not supported by this iterator.
IllegalStateException - if no element has been returned by this iterator yet.

PCJ API
Version 1.2

Report a bug or request a feature.
Further information on the development and latest release of PCJ can be found at the project homepage.

Primitive Collections for Java is released under the GNU Lesser General Public License.
Copyright © 2002, 2003 Søren Bak. All Rights Reserved.

Hosted by SourceForge.net
SourceForge.net Logo