Here you can find the source of createSingletonList(T element)
public static <T> List<T> createSingletonList(T element)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static <T> List<T> createSingletonList(T element) { List<T> result = new ArrayList<T>(); result.add(element);//from www . j a v a 2 s . c om return result; } }