I have a class that implements the Enumeration interface, but Java\'s foreach loop requires the Iterator interface. Is there an <
Enumeration
Iterator
If you just want something to iterate over in a for-each loop (so an Iterable and not only an Iterator), there's always java.util.Collections.list(Enumeration e) (without using any external libraries).
java.util.Collections.list(Enumeration e)