java Map的遍历

 

List下的Map的遍历方法

         List<String> Keys =new ArrayList<String>();
        if(SheetData.size() > 0 ){
            for(int row = 0;row<SheetData.size() ;row ++ ){
                Iterator<Map.Entry<Integer, Object>> ExcelkoumokuId = SheetData.get(row).entrySet().iterator();
                while (ExcelkoumokuId.hasNext()) {
                    Map.Entry<Integer, Object>  koumokuId = ExcelkoumokuId.next();
                    Keys.add(koumokuId.getValue().toString());
                }
            }

        }

 

posted on 2016-06-15 14:25  手撕高达的村长  阅读(163)  评论(0编辑  收藏  举报

导航