枚举为Iterable
// Licensed to the Apache Software Foundation (ASF) under one //package com.nowjava; import java.util.Enumeration; import java.util.Iterator; /** 来自 时 代 Java - nowjava.com**/ public class Main { public static <T> Iterable<T> enumerationAsIterable( final Enumeration<T> e) { return new Iterable<T>() { public Iterator<T> iterator() { return new Iterator<T>() { public boolean hasNext() { return e.hasMoreElements(); } public T next() { return e.nextElement();//来 自 NowJava.com - 时 代 Java } public