Package org.openl.util
Class AIndexedIterator<T>
java.lang.Object
org.openl.util.AOpenIterator<T>
org.openl.util.AIndexedIterator<T>
- All Implemented Interfaces:
Iterator<T>,IOpenIterator<T>
- Author:
- snshor
-
Field Summary
Fields inherited from class org.openl.util.AOpenIterator
EMPTY_ITERATORFields inherited from interface org.openl.util.IOpenIterator
UNKNOWN_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromArrayObj(Object ary) final booleanhasNext()protected abstract TindexedElement(int i) next()final intsize()Calculates the remaining size of iterated collection without destroying itself(const in c++ terminology), -1 if it cannot be known in advance.Methods inherited from class org.openl.util.AOpenIterator
empty, removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
AIndexedIterator
protected AIndexedIterator(int from, int to, int step)
-
-
Method Details
-
fromArrayObj
-
hasNext
public final boolean hasNext() -
indexedElement
-
next
-
size
public final int size()Description copied from class:AOpenIteratorCalculates the remaining size of iterated collection without destroying itself(const in c++ terminology), -1 if it cannot be known in advance. Not every iterator is capable of doing it.- Specified by:
sizein interfaceIOpenIterator<T>- Overrides:
sizein classAOpenIterator<T>- Returns:
- the number of elements left to iterate, or UNKNOWN_SIZE if it is not known, this method is "const"
-