com.ibm.wala.util.collections
Class ArrayIterator<T>
java.lang.Object
com.ibm.wala.util.collections.ArrayIterator<T>
- All Implemented Interfaces:
- java.util.Iterator<T>
- Direct Known Subclasses:
- ArrayNonNullIterator
public class ArrayIterator<T>
- extends java.lang.Object
- implements java.util.Iterator<T>
an Iterator of array elements
|
Field Summary |
protected int |
_cnt
The index of the next array element to return |
protected T[] |
_elts
The array source for the iterator |
protected int |
last
The index of the last array element to return |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_cnt
protected int _cnt
- The index of the next array element to return
last
protected final int last
- The index of the last array element to return
_elts
protected final T[] _elts
- The array source for the iterator
ArrayIterator
public ArrayIterator(T[] elts)
- Parameters:
elts - the array which should be iterated over
ArrayIterator
public ArrayIterator(T[] elts,
int start)
- Parameters:
elts - the array which should be iterated overstart - the first array index to return
ArrayIterator
public ArrayIterator(T[] elts,
int start,
int last)
- Parameters:
elts - the array which should be iterated overstart - the first array index to return
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface java.util.Iterator<T>
next
public T next()
throws java.util.NoSuchElementException
- Specified by:
next in interface java.util.Iterator<T>
- Throws:
java.util.NoSuchElementException
remove
public void remove()
throws java.lang.UnsupportedOperationException
- Specified by:
remove in interface java.util.Iterator<T>
- Throws:
java.lang.UnsupportedOperationException