Oct 14
|
Sometimes an api will return you an Enumeration but what you want is a List. The Collections class has a utility method that creates a List containing the elements from the Enumeration.
Enumeration en = someMethodThatReturnsEnumeration(); List list = Collections.list(en);