Java Set to List setToList(Set set)

Here you can find the source of setToList(Set set)

Description

Returns a set as a list

License

Open Source License

Parameter

Parameter Description
set Input set

Return

Output list

Declaration

static public <T> ArrayList<T> setToList(Set<T> set) 

Method Source Code


//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;
    }
}

Related

  1. convertToList(Set set)
  2. convertToList(Set set)
  3. setToList(Set set)
  4. setToList(Set set)
  5. setToList(Set set)
  6. setToList(Set set)
  7. setToList(Set set)
  8. toList(Set s)
  9. toList(Set set)