Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.ArrayList;
import java.util.Collection;

import java.util.Enumeration;

public class Main {
    public static Collection<?> list(final Enumeration<?> e) {
        final ArrayList<Object> l = new ArrayList<Object>();
        if (e != null) {
            while (e.hasMoreElements()) {
                final Object object = e.nextElement();
                if (object != null) {
                    l.add(object);
                }
            }
        }
        return l;
    }
}