标签:eid [1] parse split tcl vol shm 去重 value
Map<String,Object> courseMap = new HashMap<>();
for(vo tv: volist){
String key = tv.getCourseId() + "_" + tv.getCalendarId() + "_" + tv.getClassId();
String value = tv.getContent() + "(" + 1 + ")";
boolean flag = courseMap.containsKey(key);
if (flag) {
int courseNum=1;
String content = (String) courseMap.get(key);
String[] split = content.split("\\(");
courseNum = Integer.parseInt(split[1].split("\\)")[0]);
courseNum++;
value = tv.getContent() + "(" + courseNum + ")";
}
courseMap.put(key, value);
}
标签:eid [1] parse split tcl vol shm 去重 value
原文地址:http://www.cnblogs.com/susuhyc/p/7550980.html