Class CloseableIteratorAdapter<T>

  • All Implemented Interfaces:
    com.mysema.commons.lang.CloseableIterator<T>, Closeable, AutoCloseable, Iterator<T>

    public class CloseableIteratorAdapter<T>
    extends Object
    implements com.mysema.commons.lang.CloseableIterator<T>
    A wrapper for a regular Iterator as CloseableIterator
    • Constructor Detail

      • CloseableIteratorAdapter

        public CloseableIteratorAdapter​(Iterator<T> iterator)
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface com.mysema.commons.lang.CloseableIterator<T>
      • hasNext

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

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

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