Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Add org.apache.commons.collections4.EnumerationUtils.asIterable(Enumeration<T>)
/** * Gets an {@link Iterable} that wraps an {@link Enumeration}. The returned {@link Iterable} can be used for a * single iteration. * * @param <T> the element type * @param enumeration the enumeration to use, may not be null * @return a new, single use {@link Iterable} * @throws NullPointerException if iterator is null * @since 4.5 */ public static <T> Iterable<T> asIterable(final Enumeration<T> enumeration) { return new IteratorIterable<>(new EnumerationIterator<>(enumeration)); }