Class IndexBasedIterator<T>
java.lang.Object
org.aksw.commons.collections.cache.IndexBasedIterator<T>
- All Implemented Interfaces:
Iterator<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIndexBasedIterator(List<T> list) IndexBasedIterator(List<T> list, int offset) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
list
-
offset
protected int offset
-
-
Constructor Details
-
IndexBasedIterator
-
IndexBasedIterator
-
-
Method Details
-
hasNext
public boolean hasNext()Simply try to access an element by index. This way, a lazy loading list can block the call to .get() until it knows whether there is sufficient data. -
next
-
getOffset
public int getOffset() -
toString
-