Java tutorial
//package com.java2s; /* * Copyright: Copyright 2010 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html * * @author Sven Krosse * @email krosse@informatik.uni-leipzig.de * */ import java.util.Collection; import java.util.LinkedList; import java.util.List; public class Main { /** * Transformation operation for a {@link Collection} to a {@link List}. * * @param <E> * the type of the given and returned values * @param collection * the collection to transform * @return the new {@link List}, containing all entries of the given * collection */ public static <E extends Object> List<E> asList(Collection<E> collection) { List<E> list = new LinkedList<E>(); list.addAll(collection); return list; } }