Class TransformingIterator<T1,T2>
- java.lang.Object
-
- org.codehaus.commons.compiler.util.iterator.TransformingIterator<T1,T2>
-
- Type Parameters:
T1- The element type of the delegate iteratorT2- The element type of this iterator
- All Implemented Interfaces:
java.util.Iterator<T2>
public abstract class TransformingIterator<T1,T2> extends java.lang.Object implements java.util.Iterator<T2>AnIteratorthat transforms its elements on-the-fly.
-
-
Constructor Summary
Constructors Constructor Description TransformingIterator(java.util.Iterator<? extends T1> delegate)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanhasNext()T2next()voidremove()protected abstract T2transform(T1 o)Derived classes must implement this method such that it does the desired transformation.
-
-
-
Constructor Detail
-
TransformingIterator
public TransformingIterator(java.util.Iterator<? extends T1> delegate)
-
-