2
13693261870
2022-09-16 653761a31dfeb50dd3d007e892d69c90bf0cdafc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.landtool.lanbase.common.utils;
 
import java.util.ArrayList;
import java.util.List;
 
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Transformer;
 
/**
 * @Description: 格式转换工具
 * @Author: zimao.guo
 * @Date: 15:15 2018/2/9
 */
public class TransformUtils {
 
    /**
     * @Description: String转Longlist
     * @Author: zimao.guo
     * @Date: 15:16 2018/2/9
     * @return: List<Long>
     * @see Long
     * @param inList
     */
    public static List<Long> StringToLongList(List<String> inList){
        List<Long> LongList = new ArrayList<Long>(inList.size());
        CollectionUtils.collect(inList, new Transformer() {
            @Override
            public Object transform(Object o) {
                return new Long((String)o);
            }
        },LongList);
        return LongList;
    }
 
}