Class ArrayIterator<T>
java.lang.Object
com.ibm.wala.util.collections.ArrayIterator<T>
- All Implemented Interfaces:
Iterator<T>
- Direct Known Subclasses:
ArrayNonNullIterator
an Iterator of array elements
-
Field Summary
-
Constructor Summary
ConstructorDescriptionArrayIterator
(T[] elts) ArrayIterator
(T[] elts, int start) ArrayIterator
(T[] elts, int start, int last) -
Method Summary
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
-
Field Details
-
_cnt
protected int _cntThe index of the next array element to return -
last
protected final int lastThe index of the last array element to return -
_elts
The array source for the iterator
-
-
Constructor Details
-
ArrayIterator
- Parameters:
elts
- the array which should be iterated over
-
ArrayIterator
- Parameters:
elts
- the array which should be iterated overstart
- the first array index to return
-
ArrayIterator
- Parameters:
elts
- the array which should be iterated overstart
- the first array index to return
-
-
Method Details
-
hasNext
-
next
- Specified by:
next
in interfaceIterator<T>
- Throws:
NoSuchElementException
-
remove
- Specified by:
remove
in interfaceIterator<T>
- Throws:
UnsupportedOperationException
-