public class TransformingIterator<S,T> extends Object implements Iterator<T>
remove() is not supported! Please
see getTransformingIterable(Iterable, ITransformer) to wrap your original collection into a filtered
collection.| Constructor and Description |
|---|
TransformingIterator(Iterable<S> parent,
ITransformer<S,T> transformer)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
static <I extends Iterable<T>,S,T> |
getTransformingIterable(Iterable<S> iterable,
ITransformer<S,T> transformer)
creates a proxy using the given iterable instance. if an iterator is requested, the orginal iterator will be
wrapped into the
TransformingIterator. |
boolean |
hasNext() |
T |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic TransformingIterator(Iterable<S> parent, ITransformer<S,T> transformer)
parent - transformer - public static <I extends Iterable<T>,S,T> I getTransformingIterable(Iterable<S> iterable, ITransformer<S,T> transformer)
TransformingIterator.
As the original instance (the collection) will be preserved, all other methods like size(), contains() etc. will
work on the un-filtered content!I - iterable type - mostly at least a collectionT - member type of the iterableiterable - iterable instancetransformer - item filter/selectorCopyright © 2012–2018. All rights reserved.