jdsl
Class ArrayIterator

java.lang.Object
  |
  +--jdsl.ArrayIterator

public class ArrayIterator
extends java.lang.Object
implements java.util.Iterator

An array based enumerator to implement enumerations efficiently for jdsl structures.


Constructor Summary
ArrayIterator(java.lang.Object[] array)
          Iterator traverses.
 
Method Summary
 boolean hasNext()
          Tests if this Iterator contains more elements.
 java.lang.Object next()
          Returns the next element of this Iterator.
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayIterator

public ArrayIterator(java.lang.Object[] array)
Iterator traverses. The array is NOT copied.
Parameters:
array - The elements that this Iterator should traverse.
Method Detail

hasNext

public boolean hasNext()
Tests if this Iterator contains more elements.
Specified by:
hasNext in interface java.util.Iterator
Returns:
true if this Iterator contains more elements; false otherwise.

next

public java.lang.Object next()
Returns the next element of this Iterator.
Specified by:
next in interface java.util.Iterator
Returns:
the next element of this Iterator.
Throws:
java.util.NoSuchElementException - if no more elements exist.

remove

public void remove()
            throws java.lang.UnsupportedOperationException,
                   java.lang.IllegalStateException
Specified by:
remove in interface java.util.Iterator