public static class IntArraySet.IntArrayIterator extends java.lang.Object implements IntIterator
| Constructor and Description |
|---|
IntArrayIterator(int[] contents,
int limit)
Create an iterator over the integers in an array (in positions 0 to n-1
inclusive, where n is the value of the limit argument)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Test whether there are any more integers in the sequence; and change the state of
the iterator so a call on
IntIterator.next() delivers the next integer. |
int |
next()
Return the next integer in the sequence.
|
public IntArrayIterator(int[] contents,
int limit)
contents - the array over which to iteratelimit - the number of items to be included in the iterationpublic boolean hasNext()
IntIteratorIntIterator.next() delivers the next integer.
The effect of calling #hasNext() a second time without an intervening
call on #next() is undefined.
hasNext in interface IntIteratorpublic int next()
IntIterator#hasNext() has been called
and has returned true.next in interface IntIteratorCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.