Java Collection to List toList(Collection c)

Here you can find the source of toList(Collection c)

Description

to List

License

Open Source License

Declaration

public static <T> List<T> toList(Collection<T> c) 

Method Source Code


//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));
    }//from  w  ww .  j a v a 2 s . co  m

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

Related

  1. toList(Collection collection)
  2. toList(Collection collection)
  3. toList(Collection c)
  4. toList(Collection collection)
  5. toList(Collection lines)
  6. toList(Collection c)
  7. toList(Collection collection)