首页 > 技术文章 > java Map的遍历

sunxun 2016-06-15 14:25 原文

 

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());
                }
            }

        }

 

推荐阅读