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.


Constructor Summary
IntArrayIterator(int[] src)
           
IntArrayIterator(int[] src, int len)
           
IntArrayIterator(int[] src, int off, int len)
           
IntArrayIterator(IntArray src)
          Creates an iterator over the values in the given IntArray.
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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