Here you can find the source of setToList(Set
public static <T> List<T> setToList(Set<T> set)
//package com.java2s; //License from project: LGPL 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>(0); list.addAll(set);//from ww w . j av a2s . co m return list; } }