public class ArrayEnumeration implements Enumeration<ElementType>(Code)
Converts an array to an enumerator.
More information about this class is available from ostermiller.org.
author: Stephen Ostermiller http://ostermiller.org/contact.pl?regarding=Java+Utilities< Parameters: ElementType - > Type of object enumerated since: ostermillerutils 1.03.00
Constructor Summary
public
ArrayEnumeration(ElementType[] array) Create an Enumeration from an Array.
Method Summary
public boolean
hasMoreElements() Tests if this enumeration contains more elements.
public ElementType
nextElement() Returns the next element of this enumeration if this enumeration
object has at least one more element to provide.
Constructor Detail
ArrayEnumeration
public ArrayEnumeration(ElementType[] array)(Code)
Create an Enumeration from an Array.
Parameters: array - of objects on which to enumerate. since: ostermillerutils 1.03.00
Tests if this enumeration contains more elements.
true if and only if this enumeration object contains at leastone more element to provide; false otherwise. since: ostermillerutils 1.03.00
Returns the next element of this enumeration if this enumeration
object has at least one more element to provide.
the next element of this enumeration. throws: NoSuchElementException - if no more elements exist. since: ostermillerutils 1.03.00