Here you can find the source of transformCollectionTOList(Collection
Parameter | Description |
---|---|
E | a parameter |
collection | a parameter |
public static <E> List<E> transformCollectionTOList(Collection<E> collection)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Collection; import java.util.List; public class Main { /**/* w w w . j av a 2 s . co m*/ * Transform of Collection to List * * @param <E> * * @param collection * @return */ public static <E> List<E> transformCollectionTOList(Collection<E> collection) { List<E> collectionList = new ArrayList<E>(); for (E obj : collection) { collectionList.add(obj); } return collectionList; } }