Here you can find the source of toLongList(Set
public static List<Long> toLongList(Set<String> set)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; import java.util.Set; public class Main { public static List<Long> toLongList(Set<String> set) { if (set == null) { return null; }// ww w . ja v a 2 s . c o m List<Long> list = new ArrayList<Long>(); for (String str : set) { list.add(Long.parseLong(str)); } return list; } }