From - The type to convert values from.To - The type to convert values to.public final class ConvertingIterator<From,To> extends Object implements Iterator<To>
ConvertingIterator is an Iterator that can be wrapped
around a given Iterator and converts all values with a given
Converter.| Constructor and Description |
|---|
ConvertingIterator(Iterator<? extends From> iterator,
Converter<From,To> converter)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
To |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic ConvertingIterator(Iterator<? extends From> iterator, Converter<From,To> converter) throws IllegalArgumentException
iterator - The Iterator, around which the new
NullFreeIterator will be wrapped.converter - The Converter to convert every value yielded by the given Iterator
with.IllegalArgumentException - If the given Iterator is null or the given
Converter is null.Copyright © 2015–2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.