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
    • Field Summary

      • Fields inherited from class org.apache.jena.atlas.iterator.IteratorWrapper

        iterator
    • Constructor Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void abort()
      Can call asynchronously at anytime
      boolean hasNext()  
      static <T> java.util.Iterator<T> makeAbortable​(java.util.Iterator<T> iter, java.util.List<Abortable> killList)
      Create an abortable iterator, storing it in the killList.
      T next()  
      • Methods inherited from class org.apache.jena.atlas.iterator.IteratorWrapper

        close, get, 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

      • IterAbortable

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

      • makeAbortable

        public static <T> java.util.Iterator<T> makeAbortable​(java.util.Iterator<T> iter,
                                                              java.util.List<Abortable> killList)
        Create an abortable iterator, storing it in the killList. Just return the input iterator if kilList is null.
      • abort

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

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

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