com.inxar.syntacs.util
Class IntArrayIterator
java.lang.Object
|
+--com.inxar.syntacs.util.IntArrayIterator
- All Implemented Interfaces:
- IntIterator
- public class IntArrayIterator
- extends Object
- implements IntIterator
Concrete implementation of IntIterator
which steps an
int[]
array.
Method Summary |
boolean |
hasNext()
Returns true if there is at least one more
element, false otherwise (at the end of the list). |
int |
next()
Moves the index pointer forward by one and returns the value at
that position. |
IntArrayIterator
public IntArrayIterator(IntArray src)
- Creates an iterator over the values in the given
IntArray
. The IntArray.toArray()
is
called to "guarantee" a clean arraycopy.
IntArrayIterator
public IntArrayIterator(int[] src)
IntArrayIterator
public IntArrayIterator(int[] src,
int len)
IntArrayIterator
public IntArrayIterator(int[] src,
int off,
int len)
hasNext
public boolean hasNext()
- Description copied from interface:
IntIterator
- Returns
true
if there is at least one more
element, false
otherwise (at the end of the list).
- Specified by:
hasNext
in interface IntIterator
next
public int next()
- Description copied from interface:
IntIterator
- Moves the index pointer forward by one and returns the value at
that position.
- Specified by:
next
in interface IntIterator