Class IterAbortable<T>

  • All Implemented Interfaces:
    java.util.Iterator<T>, org.apache.jena.atlas.iterator.IteratorCloseable<T>, org.apache.jena.atlas.lib.Closeable, Abortable

    public class IterAbortable<T>
    extends org.apache.jena.atlas.iterator.IteratorWrapper<T>
    implements Abortable, org.apache.jena.atlas.iterator.IteratorCloseable<T>
    Plain iterator version to add "abort" functionality. Iterator that adds an abort operation which can be called at any time, including from another thread, and causes the iterator to throw an exception when next touched (hasNext, next).
    • Constructor Summary

      Constructor Description
      IterAbortable​(java.util.Iterator<T> iterator)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void abort()
      Can call asynchronously at any time
      boolean hasNext()  
      T next()  
      void remove()  
      • Methods inherited from class org.apache.jena.atlas.iterator.IteratorWrapper

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.jena.atlas.lib.Closeable

      • Methods inherited from interface java.util.Iterator

    • Constructor Detail

      • IterAbortable

        public IterAbortable​(java.util.Iterator<T> iterator)
    • Method Detail

      • abort

        public void abort()
        Can call asynchronously at any time
        Specified by:
        abort in interface Abortable
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<T>
        hasNext in class org.apache.jena.atlas.iterator.IteratorWrapper<T>
      • next

        public T next()
        Specified by:
        next in interface java.util.Iterator<T>
        next in class org.apache.jena.atlas.iterator.IteratorWrapper<T>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<T>
        remove in class org.apache.jena.atlas.iterator.IteratorWrapper<T>