Class Iterators.Adapter<T,​U>

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

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

      • Adapter

        public Adapter​(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 Iterator<T>