simple.util
Class ArrayIterator<E>

java.lang.Object
  extended by simple.util.ArrayIterator<E>
Type Parameters:
E - Class of the elements in the array
All Implemented Interfaces:
java.util.Iterator<E>

public class ArrayIterator<E>
extends java.lang.Object
implements java.util.Iterator<E>

Takes an Object array and creates an iterator.
Created: 2006

Author:
KP

Field Summary
private  E[] array
           
private  int pos
           
 
Constructor Summary
ArrayIterator(E[] array)
           
 
Method Summary
 boolean hasNext()
           
 E next()
           
 void remove()
          Not used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

array

private final E[] array

pos

private int pos
Constructor Detail

ArrayIterator

public ArrayIterator(E[] array)
Parameters:
array - Array to iterate.
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<E>

next

public E next()
Specified by:
next in interface java.util.Iterator<E>

remove

public void remove()
Not used.

Specified by:
remove in interface java.util.Iterator<E>