public final class Enumerations
extends java.lang.Object
Enumerations, like wrapping Enumerations as Iterables.| Modifier and Type | Method and Description |
|---|---|
static <T> java.lang.Iterable<T> |
iterable(java.util.Enumeration<T> enumeration)
Allows using of
Enumeration with the for-each statement. |
public static final <T> java.lang.Iterable<T> iterable(java.util.Enumeration<T> enumeration)
Enumeration with the for-each statement. The implementation is not using any heap space and such is able to serve virtually endless Enumerations, while Collections.list(java.util.Enumeration<T>) is limited by available RAM. As a result, this implementation is much faster than Collections.list.enumeration - The original enumeration.Iterable directly calling the original Enumeration.Copyright © 2010-2012 Head Crashing Informatics. All Rights Reserved.