Package net.sf.saxon.z
Class IntArraySet.IntArrayIterator
java.lang.Object
net.sf.saxon.z.IntArraySet.IntArrayIterator
- All Implemented Interfaces:
IntIterator
- Enclosing class:
IntArraySet
Iterator class: iterate over an array of integers
-
Constructor Summary
ConstructorsConstructorDescriptionIntArrayIterator
(int[] contents, int limit) Create an iterator over the integers in an array (in positions 0 to n-1 inclusive, were n is the value of the limit argument) -
Method Summary
-
Constructor Details
-
IntArrayIterator
public IntArrayIterator(int[] contents, int limit) Create an iterator over the integers in an array (in positions 0 to n-1 inclusive, were n is the value of the limit argument)- Parameters:
contents
- the array over which to iteratelimit
- the number of items to be included in the iteration
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:IntIterator
Test whether there are any more integers in the sequence- Specified by:
hasNext
in interfaceIntIterator
- Returns:
- true if there are more integers to come
-
next
public int next()Description copied from interface:IntIterator
Return the next integer in the sequence. The result is undefined unless hasNext() has been called and has returned true.- Specified by:
next
in interfaceIntIterator
- Returns:
- the next integer in the sequence
-