Groovy JDK

java.util
Class Enumeration

Method Summary
boolean asBoolean()
Coerce an enumeration instance to a boolean value.
Iterator iterator()
Allows an Enumeration to behave like an Iterator.
List toList()
Convert an enumeration to a List.
Set toSet()
Convert an enumeration to a Set.
 
Method Detail

asBoolean

public boolean asBoolean()
 
Coerce an enumeration instance to a boolean value. An enumeration is coerced to false if there are no more elements to enumerate, and to true otherwise.
Returns:
the boolean value
Since:
1.7.0

iterator

public Iterator iterator()
 
Allows an Enumeration to behave like an Iterator. Note that the Iterator#remove method is unsupported since the underlying Enumeration does not provide a mechanism for removing items.
Returns:
an Iterator for the given Enumeration
Since:
1.0

toList

public List toList()
 
Convert an enumeration to a List.
Returns:
a List
Since:
1.5.0

toSet

public Set toSet()
 
Convert an enumeration to a Set.
Returns:
a Set
Since:
1.8.0

Groovy JDK