Web Site

org.codehaus.janino.util.iterator
Class TransformingIterator

java.lang.Object
  extended byorg.codehaus.janino.util.iterator.FilterIterator
      extended byorg.codehaus.janino.util.iterator.TransformingIterator
All Implemented Interfaces:
Iterator

public abstract class TransformingIterator
extends FilterIterator

An Iterator that transforms its elements on-the-fly.


Field Summary
 
Fields inherited from class org.codehaus.janino.util.iterator.FilterIterator
delegate
 
Constructor Summary
TransformingIterator(Iterator delegate)
           
 
Method Summary
 Object next()
           
protected abstract  Object transform(Object o)
          Derived classes must implement this method such that it does the desired transformation.
 
Methods inherited from class org.codehaus.janino.util.iterator.FilterIterator
hasNext, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformingIterator

public TransformingIterator(Iterator delegate)
Method Detail

next

public final Object next()
Specified by:
next in interface Iterator
Overrides:
next in class FilterIterator

transform

protected abstract Object transform(Object o)
Derived classes must implement this method such that it does the desired transformation.


Web Site