Class TransformingIterator

  • All Implemented Interfaces:
    java.util.Iterator

    public abstract class TransformingIterator
    extends FilterIterator
    An Iterator that transforms its elements on-the-fly.
    • Constructor Summary

      Constructors 
      Constructor Description
      TransformingIterator​(java.util.Iterator delegate)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object next()  
      protected abstract java.lang.Object transform​(java.lang.Object o)
      Derived classes must implement this method such that it does the desired transformation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • TransformingIterator

        public TransformingIterator​(java.util.Iterator delegate)
    • Method Detail

      • next

        public final java.lang.Object next()
        Specified by:
        next in interface java.util.Iterator
        Overrides:
        next in class FilterIterator
      • transform

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