Java Collection to List collectionToList(Collection theset)

Here you can find the source of collectionToList(Collection theset)

Description

collection To List

License

Open Source License

Declaration

public static <E> List<E> collectionToList(Collection<E> theset) 

Method Source Code

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

import java.util.ArrayList;

import java.util.Collection;

import java.util.List;

public class Main {
    public static <E> List<E> collectionToList(Collection<E> theset) {
        List<E> thelist = new ArrayList<E>();
        for (E obj : theset)
            thelist.add(obj);//  w w w  . j  ava 2s. c o m
        return thelist;
    }
}

Related

  1. collectionToList(Collection source)
  2. collectionToList(Iterable c)
  3. convertCollectionToList(Collection c)
  4. convertCollectionToList(Collection coll)