对Map的操作

it2025-10-07  7

Iterator<Integer> it = boEws.getMapTEwsPara().keySet().iterator(); while(it.hasNext()) { Integer paraId = (Integer) it.next(); logger.debug("paraid是:"+paraId); String fromParaCode = boEws.getMapTEwsPara().get(paraId).getFromParaCode(); Map<String, String> mapTEwsPara = new HashMap<String, String>(); mapTEwsPara.put(paraId.toString(), fromParaCode); neopRequest.setCmdPara(mapTEwsPara);//命令参数 }

  

private void buildChildNode(IBusinessContext ctx,String targetName,MBTransItem child,StringBuffer bf){ HashMap map = ctx.getParam(targetName); Iterator it = map.entrySet().iterator(); while (it.hasNext()){ Map.Entry<String, HashMap> entry1=(Map.Entry<String, HashMap>)it.next(); HashMap hm = entry1.getValue(); buildItem(hm,child,bf); } }

 

转载于:https://www.cnblogs.com/kunpengit/archive/2013/01/23/2872701.html

最新回复(0)