Java Set to List toList(Set theValues)

Here you can find the source of toList(Set theValues)

Description

to List

License

Apache License

Declaration

public static <T> ArrayList<T> toList(Set<T> theValues) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;

import java.util.Set;

public class Main {
    public static <T> ArrayList<T> toList(Set<T> theValues) {
        ArrayList<T> retVal = new ArrayList<T>();
        if (theValues != null) {
            for (T t : theValues) {
                retVal.add(t);/*from   ww  w . ja  v a  2  s .  co m*/
            }
        }
        return retVal;
    }
}

Related

  1. setToList(Set set)
  2. setToList(Set set)
  3. setToList(Set set)
  4. toList(Set s)
  5. toList(Set set)