Here you can find the source of setToList(Set
public static <T> List<T> setToList(Set<T> set)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static <T> List<T> setToList(Set<T> set) { if (set == null) { return null; }/*ww w .j a va 2 s. co m*/ return new ArrayList<T>(set); } }