local.tomas.util.collections
Class MappedIterator<F,T>
java.lang.Object
local.tomas.util.collections.MappedIterator<F,T>
- Type Parameters:
F - original element typeT - mapped element type
- All Implemented Interfaces:
- Iterator<T>
- Direct Known Subclasses:
- MappedListIterator
public class MappedIterator<F,T>
- extends Object
- implements Iterator<T>
Mapped iterator.
A mapped iterator iterates over the elements of the base iterator mapped through a mapping.
- Author:
- tomas.teubner
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mapper
protected final ObjectMapping<T> mapper
MappedIterator
public MappedIterator(Iterator<F> iterator,
ObjectMapping<T> mapper)
- Construct mapped iterator.
- Parameters:
iterator - base iteratormapper - mapping
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<T>
next
public T next()
- Specified by:
next in interface Iterator<T>
remove
public void remove()
- Specified by:
remove in interface Iterator<T>
Copyright © 2005-2007 Tomas Teubner. All Rights Reserved.