rcm.enum
Class ArrayEnumeration

java.lang.Object
  |
  +--rcm.enum.ArrayEnumeration
All Implemented Interfaces:
java.util.Enumeration

public class ArrayEnumeration
extends java.lang.Object
implements java.util.Enumeration

Enumeration of an arbitrary array.


Constructor Summary
ArrayEnumeration(java.lang.Object[] array)
          Make an ArrayEnumeration.
 
Method Summary
 boolean hasMoreElements()
          Test if enumeration has reached end.
 java.lang.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(java.lang.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 java.util.Enumeration
Returns:
true if more elements are available to be enumerated, false if all elements have been yielded by nextElement()

nextElement

public java.lang.Object nextElement()
Get next element of enumeration.

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