com.partnersoft.data
Class ArrayIterator

java.lang.Object
  extended by com.partnersoft.data.ArrayIterator
All Implemented Interfaces:
java.util.Iterator

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

An Iterator that traverses an array of objects.

Author:
Paul Reavis Copyright 2003 Partner Software, Inc.

Constructor Summary
ArrayIterator(java.lang.Object[] base)
          Creates a new ArrayIterator based on an object array
 
Method Summary
 boolean hasNext()
          Returns true if the enumeration contains more elements; false if its empty.
 java.lang.Object next()
          Returns the next element of the enumeration.
 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[] base)
Creates a new ArrayIterator based on an object array

Method Detail

hasNext

public boolean hasNext()
Returns true if the enumeration contains more elements; false if its empty.

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Returns the next element of the enumeration. Calls to this method will enumerate successive elements.

Specified by:
next in interface java.util.Iterator
Throws:
java.util.NoSuchElementException - If no more elements exist.

remove

public void remove()
Specified by:
remove in interface java.util.Iterator