Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static <T> List<T> toList(T atLeastOneT, T... otherTs) { ArrayList<T> allTs = new ArrayList<T>(Arrays.asList(otherTs)); allTs.add(atLeastOneT); return allTs; } }