org.omnaest.utils.structure.iterator.decorator
Class IteratorToIteratorAdapter<FROM,TO>
java.lang.Object
org.omnaest.utils.structure.iterator.decorator.IteratorToIteratorAdapter<FROM,TO>
- All Implemented Interfaces:
- Iterator<TO>
public class IteratorToIteratorAdapter<FROM,TO>
- extends Object
- implements Iterator<TO>
Decorator of an Iterator which uses an ElementConverter to convert the output of the next() method of
the underlying Iterator to another type .
- Author:
- Omnaest
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IteratorToIteratorAdapter
public IteratorToIteratorAdapter(Iterator<FROM> iterator,
ElementConverter<FROM,TO> elementConverter)
- Parameters:
iterator - elementConverter - - See Also:
IteratorToIteratorAdapter
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<TO>
remove
public void remove()
- Specified by:
remove in interface Iterator<TO>
next
public TO next()
- Specified by:
next in interface Iterator<TO>
Copyright © 2013. All Rights Reserved.