org.omnaest.utils.structure.iterator
Class ElementStreamToIteratorAdapter<E>

java.lang.Object
  extended by org.omnaest.utils.structure.iterator.ElementStreamToIteratorAdapter<E>
All Implemented Interfaces:
Iterator<E>

public class ElementStreamToIteratorAdapter<E>
extends Object
implements Iterator<E>

Allows to wrap a given ElementStream as Iterator.

Notice:
The remove() method is not supported and therefore throws an UnsupportedOperationException

Author:
Omnaest

Constructor Summary
ElementStreamToIteratorAdapter(ElementStream<E> elementStream)
           
 
Method Summary
 boolean hasNext()
           
 E next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementStreamToIteratorAdapter

public ElementStreamToIteratorAdapter(ElementStream<E> elementStream)
Parameters:
elementStream -
See Also:
ElementStreamToIteratorAdapter
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<E>

next

public E next()
Specified by:
next in interface Iterator<E>

remove

public void remove()
Specified by:
remove in interface Iterator<E>


Copyright © 2013. All Rights Reserved.