[
https://issues.apache.org/jira/browse/COLLECTIONS-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory moved CONFIGURATION-780 to COLLECTIONS-744:
-----------------------------------------------------------
Key: COLLECTIONS-744 (was: CONFIGURATION-780)
Workflow: Default workflow, editable Closed status (was: classic default
workflow)
Project: Commons Collections (was: Commons Configuration)
> Add
> org.apache.commons.collections4.EnumerationUtils.asIterable(Enumeration<T>)
> -------------------------------------------------------------------------------
>
> Key: COLLECTIONS-744
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-744
> Project: Commons Collections
> Issue Type: New Feature
> Reporter: Gary D. Gregory
> Priority: Major
>
> Add
> {{org.apache.commons.collections4.EnumerationUtils.asIterable(Enumeration<T>)}}
> {code:java}
> /**
> * 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));
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)