package com.qxueyou.scc.base.util; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public final class CollectionUtils { /** * 构造list * @param objs * @return */ public static List newList(Object... objs){ List args = new ArrayList(objs.length); for(Object obj:objs){ args.add(obj); } return args; } /** * 构造list * @param objs * @return */ @SuppressWarnings("unchecked") public static List newList(Class t,T... objs){ List args = new ArrayList(objs.length); for(T obj:objs){ args.add(obj); } return args; } /** * 构造Map * @param objs 数组串 * @return */ public static Map newStringMap(String... objs){ Map map = new HashMap(objs.length); String key=null; String value = null; for(int i=0;i newObjectMap(Object... objs){ Map map = new HashMap(objs.length); String key=null; Object value = null; for(int i=0;i