Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;

public class Main {
    public static <T> List<T> toList(Collection<T> c) {
        return Collections.list(Collections.enumeration(c));
    }

    public static <T> List<T> toList(Enumeration<T> c) {
        return Collections.list(c);
    }
}