|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ccg.util.ArrayEnumeration
public final class ArrayEnumeration
Convert any array of objects into an Enumeration.
Java probably has this functionality somewhere (I just couldn't
seem to find it). This simple class puts the wrapper around an
array of objects to make the array behave like a standard Java
Enumeration.
Some notes:
EmptyEnumeration| Constructor Summary | |
|---|---|
ArrayEnumeration(Object[] array)
Contruct the array enumeration. |
|
| Method Summary | |
|---|---|
boolean |
hasMoreElements()
Determine if there are more elements. |
Object |
nextElement()
Get next element in Enumeration This returns the next item in the Enumeration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayEnumeration(Object[] array)
array - Array of objects to appear when one enumerates. You may pass
null.| Method Detail |
|---|
public boolean hasMoreElements()
hasMoreElements in interface EnumerationEnumerationpublic Object nextElement()
hasMoreElements() returns true.
nextElement in interface EnumerationEnumeration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||