Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.List; import java.util.Set; public class Main { public static <T> List<T> setToList(Set<T> set) { List<T> list = new ArrayList<T>(set.size()); list.addAll(set); return list; } }