Here you can find the source of toLongList(List
Parameter | Description |
---|---|
stringList | a String list. |
public static List<Long> toLongList(List<String> stringList)
//package com.java2s; /*//from ww w. j a v a 2 s . c o m * Copyright (c) 2013-2017 QuartzDesk.com. * Licensed under the MIT license (https://opensource.org/licenses/MIT). */ import java.util.ArrayList; import java.util.List; public class Main { /** * Converts the specified list of Strings to the list of Longs. * * @param stringList a String list. * @return the Long list. */ public static List<Long> toLongList(List<String> stringList) { List<Long> longList = new ArrayList<Long>(stringList.size()); for (String s : stringList) { longList.add(new Long(s)); } return longList; } }