Groovy JDK

java.util
Class Enumeration

Method Summary
Iterator iterator()
Allows an Enumeration to behave like an Iterator {@link Iterator#remove() remove()} method is unsupported since the underlying Enumeration does not provide a mechanism for removing items
List toList()
Convert an enumeration to a List
 
Method Detail

iterator

public Iterator iterator()
Allows an Enumeration to behave like an Iterator. Note that the {@link Iterator#remove() remove()} method is unsupported since the underlying Enumeration does not provide a mechanism for removing items.

Returns:
an Iterator for the given Enumeration

toList

public List toList()
Convert an enumeration to a List.

Returns:
a List

Groovy JDK