Class WindowedSorterIterator<T>
java.lang.Object
org.aksw.commons.collections.SinglePrefetchIterator<T>
org.aksw.commons.collections.WindowedSorterIterator<T>
- All Implemented Interfaces:
Closeable, AutoCloseable, Iterator<T>, CloseableIterator<T>
public class WindowedSorterIterator<T>
extends SinglePrefetchIterator<T>
implements CloseableIterator<T>
-
Constructor Summary
ConstructorsConstructorDescriptionWindowedSorterIterator(Iterator<T> it, int maxBufferSize, Comparator<T> comparator) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()An iterator must always free all resources once done with iteration.protected Tprefetch()static <T> CloseableIterator<T> wrap(Iterator<T> it, int maxBufferSize, Comparator<T> comparator) Methods inherited from class SinglePrefetchIterator
current, doRemove, finish, hasNext, next, remove, wasHasNextCalled, wasNextCalled, willAdvanceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining, hasNext, next, remove
-
Constructor Details
-
WindowedSorterIterator
-
-
Method Details
-
wrap
public static <T> CloseableIterator<T> wrap(Iterator<T> it, int maxBufferSize, Comparator<T> comparator) -
prefetch
-
close
public void close()Description copied from class:SinglePrefetchIteratorAn iterator must always free all resources once done with iteration. However, if iteration is aborted, this method should be called.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCloseableIterator<T>- Overrides:
closein classSinglePrefetchIterator<T>
-