Here you can find the source of asList(Set
public static <V> List<V> asList(Set<V> set)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; import java.util.List; import java.util.Set; public class Main { public static <V> List<V> asList(Set<V> set) { return (List<V>) Arrays.asList(set.toArray()); }//from ww w.j a va 2s.c o m public static <V> List<V> asList(V... values) { return (List<V>) Arrays.asList(values); } }