Package com.ibm.wala.util.collections
Class ArrayNonNullIterator<T>
- java.lang.Object
-
- com.ibm.wala.util.collections.ArrayIterator<T>
-
- com.ibm.wala.util.collections.ArrayNonNullIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>
public class ArrayNonNullIterator<T> extends ArrayIterator<T>
Iterator that only returns non-null elements of the array hasNext() return true when there is a non-null element, false otherwise next() returns the current element and advances the counter up to the next non-null element or beyond the limit of the array
-
-
Field Summary
-
Fields inherited from class com.ibm.wala.util.collections.ArrayIterator
_cnt, _elts, last
-
-
Constructor Summary
Constructors Constructor Description ArrayNonNullIterator(T[] elts)
ArrayNonNullIterator(T[] elts, int start)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
T
next()
-
Methods inherited from class com.ibm.wala.util.collections.ArrayIterator
remove
-
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
- Overrides:
hasNext
in classArrayIterator<T>
-
next
public T next()
- Specified by:
next
in interfacejava.util.Iterator<T>
- Overrides:
next
in classArrayIterator<T>
-
-