Java Set to List toList(Set s)

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

Description

to List

License

Open Source License

Declaration

public static List toList(Set s) 

Method Source Code


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

Related

  1. setToList(Set set)
  2. setToList(Set set)
  3. setToList(Set set)
  4. setToList(Set set)
  5. setToList(Set set)
  6. toList(Set set)
  7. toList(Set theValues)