org.omnaest.utils.structure.iterator
Class ElementStreamToIteratorAdapter<E>
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElementStreamToIteratorAdapter
public ElementStreamToIteratorAdapter(ElementStream<E> elementStream)
- Parameters:
elementStream - - See Also:
ElementStreamToIteratorAdapter
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.