Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { public static <T> List<T> uiqList(List<T> list) { if (list == null) { return list; } List<T> tList = new ArrayList<T>(list.size()); for (T t : list) { if (!tList.contains(t)) { tList.add(t); } } return tList; } }