lapisx.enum
Class ArrayEnumeration

java.lang.Object
  extended bylapisx.enum.ArrayEnumeration
All Implemented Interfaces:
Enumeration

public class ArrayEnumeration
extends Object
implements Enumeration

Enumeration of an arbitrary array.


Constructor Summary
ArrayEnumeration(Object[] array)
          Make an ArrayEnumeration.
 
Method Summary
 boolean hasMoreElements()
          Test if enumeration has reached end.
 Object nextElement()
          Get next element of enumeration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayEnumeration

public ArrayEnumeration(Object[] array)
Make an ArrayEnumeration.

Parameters:
array - Array to enumerate. May be null, if desired. (This is sometimes useful for producing an empty enumeration.)
Method Detail

hasMoreElements

public boolean hasMoreElements()
Test if enumeration has reached end.

Specified by:
hasMoreElements in interface Enumeration
Returns:
true if more elements are available to be enumerated, false if all elements have been yielded by nextElement()

nextElement

public Object nextElement()
Get next element of enumeration.

Specified by:
nextElement in interface Enumeration
Returns:
next element of enumeration, advancing the enumeration pointer
Throws:
NoSuchElementException - if no more elements