Class Iterators.Adapter<T,​U>

  • All Implemented Interfaces:
    java.util.Iterator<T>
    Enclosing class:
    Iterators

    public abstract static class Iterators.Adapter<T,​U>
    extends java.lang.Object
    Iterator that wraps another Iterator and changes its type.
    • Constructor Summary

      Constructors 
      Constructor Description
      Adapter​(java.util.Iterator<? extends U> core)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract T filter​(U u)  
      boolean hasNext()  
      T next()  
      void remove()  
      • 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

      • Adapter

        public Adapter​(java.util.Iterator<? extends U> core)
    • Method Detail

      • hasNext

        public boolean hasNext()
      • next

        public T next()
      • filter

        protected abstract T filter​(U u)
      • remove

        public final void remove()
        Specified by:
        remove in interface java.util.Iterator<T>