Class MappingIterator<A,​B>

  • Type Parameters:
    A -
    B -
    All Implemented Interfaces:
    java.util.Iterator<B>

    public class MappingIterator<A,​B>
    extends java.lang.Object
    implements java.util.Iterator<B>
    Turns an iterator over elements of type A into an iterator of elements of type B
    • Constructor Summary

      Constructors 
      Constructor Description
      MappingIterator​(java.util.Iterator<A> iterator, java.util.function.Function<A,​B> map)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      B next()  
      • 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, remove
    • Constructor Detail

      • MappingIterator

        public MappingIterator​(java.util.Iterator<A> iterator,
                               java.util.function.Function<A,​B> map)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<A>
      • next

        public B next()
        Specified by:
        next in interface java.util.Iterator<A>