utilities
Class SafeEnumeration
java.lang.Object
|
+--utilities.SafeEnumeration
- All Implemented Interfaces:
- java.util.Enumeration
- public class SafeEnumeration
- extends java.lang.Object
- implements java.util.Enumeration
Grabs all the elements in an enumeration and stores them
locally before enumerating over them. This allows you to
safely modify the original structure you are enumerating
while you are enumerating.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SafeEnumeration
public SafeEnumeration(java.util.Enumeration e)
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements
in interface java.util.Enumeration
nextElement
public java.lang.Object nextElement()
- Specified by:
nextElement
in interface java.util.Enumeration