Here you can find the source of toList(Set s)
public static List toList(Set s)
//package com.java2s; import java.util.*; public class Main { public static List toList(Set s) { List result = null;// ww w .ja v a 2s. com if (s != null) { result = new ArrayList(); Iterator sIt = s.iterator(); while (sIt.hasNext()) { result.add(sIt.next()); } } return result; } }