Java tutorial
//package com.java2s; //it under the terms of the GNU Affero General Public License as published by import java.util.LinkedList; import java.util.List; public class Main { public static <T> List<T> newOneElementLinkedList(T t) { final List<T> result = new LinkedList<T>(); result.add(t); return result; } }