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