I have a simple collections question. I have a Set<String>
object. I want an Enumeration<String>
of the String
s in that Set
. I need an Enumeration<String>
since I am overriding a method that specifically returns an Enumeration<String>
. What is the cleanest/best way to go about it?
java.util.Collections.enumeration(set)
Javadoc
Returns an enumeration over the specified collection. This provides interoperability with legacy APIs that require an enumeration as input.