急,关于组合拆解的问题,求高手指点 java组合拆解treeSetListArrayList 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我要做成两个list,一个是颜色,一个是尺码的。 我要做成两个list,一个是颜色,一个是尺码的。public static void main(String args[]) { Map<String, List<Map<String, String>>> resultMap = new HashMap<String, List<Map<String, String>>>(); String color = "1627207:28338:yansefenlei:lanse"; String[] arrColor = color.split(":"); List<Map<String, String>> resultList = new ArrayList<Map<String, String>>(); Map<String, String> map = new HashMap<String, String>(); map.put(arrColor[3], arrColor[1]); resultList.add(map); resultMap.put(arrColor[0], resultList); List<Map<String, String>> list = resultMap.get("1627207"); for (Map<String, String> mmap : list) { if (mmap.containsKey("lanse")) { System.out.println("1627207" + ":" + mmap.get("lanse")); break; } } } 我要做成两个list,一个是颜色,一个是尺码的。public static void main(String args[]) { Map<String, List<Map<String, String>>> resultMap = new HashMap<String, List<Map<String, String>>>(); String color = "1627207:28338:yansefenlei:lanse"; String[] arrColor = color.split(":"); List<Map<String, String>> resultList = new ArrayList<Map<String, String>>(); Map<String, String> map = new HashMap<String, String>(); map.put(arrColor[3], arrColor[1]); resultList.add(map); resultMap.put(arrColor[0], resultList); List<Map<String, String>> list = resultMap.get("1627207"); for (Map<String, String> mmap : list) { if (mmap.containsKey("lanse")) { System.out.println("1627207" + ":" + mmap.get("lanse")); break; } } }嗯很好,这样可以解决,非常感谢。我用了另外一种做法也解决了,我写了一个类Item,里面含有List<Item>这样也解决了我这个问题 请教kindeditor添加flash问题 在线客服软件是怎么知道老客户来访的啊 jsp打印时内容不出来 java解析以下载的htm 模糊查询统计数据的问题 javascript问题??????? tomcat下http500错误 怎么会是空白页面? 如何在同一个文本框中,实现对多个表的查询 各位兄弟姐妹!!请问在深圳做ASP和JSP每月能拿多少元?? jsp页面空指针异常错误 nginx反向代理为什么不成功
我要做成两个list,一个是颜色,一个是尺码的。
我要做成两个list,一个是颜色,一个是尺码的。
public static void main(String args[]) {
Map<String, List<Map<String, String>>> resultMap = new HashMap<String, List<Map<String, String>>>();
String color = "1627207:28338:yansefenlei:lanse";
String[] arrColor = color.split(":");
List<Map<String, String>> resultList = new ArrayList<Map<String, String>>();
Map<String, String> map = new HashMap<String, String>();
map.put(arrColor[3], arrColor[1]);
resultList.add(map);
resultMap.put(arrColor[0], resultList);
List<Map<String, String>> list = resultMap.get("1627207");
for (Map<String, String> mmap : list) {
if (mmap.containsKey("lanse")) {
System.out.println("1627207" + ":" + mmap.get("lanse"));
break;
}
}
}
我要做成两个list,一个是颜色,一个是尺码的。
public static void main(String args[]) {
Map<String, List<Map<String, String>>> resultMap = new HashMap<String, List<Map<String, String>>>();
String color = "1627207:28338:yansefenlei:lanse";
String[] arrColor = color.split(":");
List<Map<String, String>> resultList = new ArrayList<Map<String, String>>();
Map<String, String> map = new HashMap<String, String>();
map.put(arrColor[3], arrColor[1]);
resultList.add(map);
resultMap.put(arrColor[0], resultList);
List<Map<String, String>> list = resultMap.get("1627207");
for (Map<String, String> mmap : list) {
if (mmap.containsKey("lanse")) {
System.out.println("1627207" + ":" + mmap.get("lanse"));
break;
}
}
}
嗯很好,这样可以解决,非常感谢。我用了另外一种做法也解决了,我写了一个类Item,里面含有List<Item>这样也解决了我这个问题