Java List to Long Number Array toLongList(Set set)

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

Description

to Long List

License

Apache License

Declaration

public static List<Long> toLongList(Set<String> set) 

Method Source Code


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

Related

  1. toLongArray(List list)
  2. toLongArray(List list)
  3. toLongArray(List values)
  4. toLongList(List members)
  5. toLongList(List stringList)