Here you can find the source of setToList(Set
Parameter | Description |
---|---|
set | Input set |
static public <T> ArrayList<T> setToList(Set<T> set)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { /**/*w w w.j a v a 2 s . c o m*/ * Returns a set as a list * @param set Input set * @return Output list */ static public <T> ArrayList<T> setToList(Set<T> set) { ArrayList<T> list = new ArrayList<T>(); for (T attr : set) { list.add(attr); } return list; } }