I have a class that implements the Enumeration interface, but Java\'s foreach loop requires the Iterator interface. Is there an <
Enumeration
Iterator
There's nothing that is part of the standard library. Unfortunately you'll have to roll your own adapter. There are examples out there of what others have done, for example:
IterableEnumerator