2.17.2: 2011-06-17

net.sf.basedb.util
Class ArrayIterator<E>

java.lang.Object
  extended by net.sf.basedb.util.ArrayIterator<E>
All Implemented Interfaces:
Iterator<E>

public class ArrayIterator<E>
extends Object
implements Iterator<E>

This class implements the Iterator interface for an array of objects.

Version:
2.0
Author:
Nicklas

Field Summary
private  E[] array
          The array to iterate.
private  int index
          The index of the next element to return.
 
Constructor Summary
ArrayIterator(E[] array)
          Create a new ArrayIterator object.
 
Method Summary
 boolean hasNext()
           
 E next()
           
 void remove()
          This operation is not supported.
 
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
The array to iterate.


index

private int index
The index of the next element to return.

Constructor Detail

ArrayIterator

public ArrayIterator(E[] array)
Create a new ArrayIterator object.

Parameters:
array - Array to set.
Method Detail

hasNext

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

next

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

remove

public void remove()
This operation is not supported.

Specified by:
remove in interface Iterator<E>
Throws:
UnsupportedOperationException - Is always thrown

2.17.2: 2011-06-17