因为项目需要编写:util
package com.fzjc.earth.info.util;
import java.util.Arrays;
import java.util.List;
/**
* @ClassName ResolverUtil
*
*
**/
public class ResolverUtil {
/**
* 把String集合数据去"[ ]" 转成list
* @param obj
*/
public static List StringToList(String obj){
String str = "";
String value = obj.replace("[",str);
value = value.replace("]",str);
List<String> objValues = Arrays.asList(value.split(","));
return objValues;
}
/**
* 把String集合数据去除[ "" ,""] 转成list
* @param obj
* @return
*/
public static List StringToListNo(String obj){
String str = "";
String value = obj.replace("[",str);
String values= value.replace(""", str);
value = values.replace("]",str);
List<String> objValues = Arrays.asList(value.split(","));
return objValues;
}
}