package fitnesse.util;
import java.util.*;
public class CollectionsUtil {
private CollectionsUtil() {
throw new UnsupportedOperationException();
}
public static List createList(Object[] args) {
List list = new ArrayList();
for (int i = 0, len = args.length; i < len; ++i) {
list.add(args[i]);
}
return list;
}
public static Map createMap(Object[] args) {
Map map = new HashMap();
for (int i = 0, len = args.length; i < len; i += 2) {
map.put(args[i], args[i+1]);
}
return map;
}
}
|