PCJ API
Version 1.2

bak.pcj.adapter
Class ByteIteratorToIteratorAdapter

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

public class ByteIteratorToIteratorAdapter
extends Object
implements Iterator

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

Since:
1.0

Constructor Summary
ByteIteratorToIteratorAdapter(ByteIterator iterator)
          Creates a new adaption to an iterator from an iterator over byte 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

ByteIteratorToIteratorAdapter

public ByteIteratorToIteratorAdapter(ByteIterator iterator)
Creates a new adaption to an iterator from an iterator over byte 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