Class MappedIterator<E,F>

java.lang.Object
org.jhotdraw8.collection.mapped.MappedIterator<E,F>
Type Parameters:
E - the mapped element type
F - the original element type
All Implemented Interfaces:
Iterator<E>

public class MappedIterator<E,F> extends Object implements Iterator<E>
Maps an Iterator to a different element type.

The underlying iterator is referenced - not copied.

Author:
Werner Randelshofer
  • Constructor Details

  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<E>
    • next

      public E next()
      Specified by:
      next in interface Iterator<E>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<E>