public static void main(String[] args) throws ParseException {
List<Map> testList = new ArrayList<Map>();
Map<String, Integer> testMap = new HashMap<String, Integer>();
testMap.put("private", 1);
testMap.put("private", 2);
testMap.put("private", 3);
testList.add(testMap);
Map maxPrivateMap = null;
for(Map<String, Integer> map: testList){
if (maxPrivateMap == null) {
maxPrivateMap = map;
continue;
}
if ((Integer)maxPrivateMap.get("private") < (Integer)map.get("private")) {
maxPrivateMap = map;
}
}
}
List<Map> testList = new ArrayList<Map>();
Map<String, Integer> testMap = new HashMap<String, Integer>();
testMap.put("private", 1);
testMap.put("private", 2);
testMap.put("private", 3);
testList.add(testMap);
Map maxPrivateMap = null;
for(Map<String, Integer> map: testList){
if (maxPrivateMap == null) {
maxPrivateMap = map;
continue;
}
if ((Integer)maxPrivateMap.get("private") < (Integer)map.get("private")) {
maxPrivateMap = map;
}
}
}