harpoon.Util
Class ArrayIterator

java.lang.Object
  |
  +--harpoon.Util.UnmodifiableIterator
        |
        +--harpoon.Util.ArrayIterator
All Implemented Interfaces:
Iterator

public class ArrayIterator
extends UnmodifiableIterator
implements Iterator

An ArrayIterator iterates over the elements of an array.

The remove() method is not implemented.

Version:
$Id: ArrayIterator.java,v 1.3 2002/02/26 22:47:24 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
ArrayIterator(Object[] oa)
          Creates an ArrayEnumerator.
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements.
 Object next()
          Returns the next element in the iteration.
 
Methods inherited from class harpoon.Util.UnmodifiableIterator
remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
remove
 

Constructor Detail

ArrayIterator

public ArrayIterator(Object[] oa)
Creates an ArrayEnumerator.

Method Detail

hasNext

public boolean hasNext()
Description copied from class: UnmodifiableIterator
Returns true if the iteration has more elements.

Specified by:
hasNext in interface Iterator
Specified by:
hasNext in class UnmodifiableIterator
Returns:
true if the iterator has more elements.

next

public Object next()
Description copied from class: UnmodifiableIterator
Returns the next element in the iteration.

Specified by:
next in interface Iterator
Specified by:
next in class UnmodifiableIterator