Class ProgressBarWrappedIterator<T>

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.util.Iterator<T>

    public class ProgressBarWrappedIterator<T>
    extends java.lang.Object
    implements java.util.Iterator<T>, java.lang.AutoCloseable
    Any iterator whose iteration is tracked by a progress bar.
    Since:
    0.6.0
    Author:
    Tongfei Chen
    • Constructor Detail

      • ProgressBarWrappedIterator

        public ProgressBarWrappedIterator​(java.util.Iterator<T> underlying,
                                          ProgressBar pb)
    • Method Detail

      • hasNext

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

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

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

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable