`

java 分组

    博客分类:
  • Java
阅读更多

 

		Map<String,List<SoRedoSvcType>> resultMap = new HashMap<String, List<SoRedoSvcType>>();
		
		for(SoRedoSvcType svcType : svcTypes) {
			List<SoRedoSvcType> groupList = resultMap.get(svcType.getServiceType());
			if(groupList == null) {
				groupList = new ArrayList<SoRedoSvcType>();
				resultMap.put(svcType.getServiceType(), groupList);
			}
			groupList.add(svcType);
		}
 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics