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