info.javelot.functionalj.util
Class ArrayIterator

java.lang.Object
  extended byinfo.javelot.functionalj.util.ArrayIterator
All Implemented Interfaces:
Iterator

public class ArrayIterator
extends Object
implements Iterator

Iterator that is used for arrays.

Author:
Copyright © 2006 Frederic Daoud

Constructor Summary
ArrayIterator(Object[] p_array)
           
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements.
 Object next()
          Returns the next element in the iteration of the array.
 void remove()
          Throws a UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayIterator

public ArrayIterator(Object[] p_array)
Method Detail

hasNext

public boolean hasNext()
Returns true if the iteration has more elements.

Specified by:
hasNext in interface Iterator
Returns:
true if the iteration has more elements.

next

public Object next()
            throws NoSuchElementException
Returns the next element in the iteration of the array.

Specified by:
next in interface Iterator
Returns:
the next element in the iteration.
Throws:
NoSuchElementException - thrown if this method is called and the iteration is past the end of the array.

remove

public void remove()
Throws a UnsupportedOperationException.

Specified by:
remove in interface Iterator