Example #1
0
 private static IEnumerable ToEnumer(java.util.Enumeration enumeration)
 {
     List<object> list = new List<object>();
     while (enumeration.hasMoreElements())
     {
         list.Add(enumeration.nextElement());
     }
     return list;
 }
 /**
  * Adds all elements in the enumeration to the given collection.
  *
  * @param collection  the collection to add to, must not be null
  * @param enumeration  the enumeration of elements to add, must not be null
  * @throws NullPointerException if the collection or enumeration is null
  */
 public static void addAll(java.util.Collection<Object> collection, java.util.Enumeration<Object> enumeration)
 {
     while (enumeration.hasMoreElements())
     {
         collection.add(enumeration.nextElement());
     }
 }