i have a Vector of Hashmap and the HashMap contains different data types:
Vector<HashMap<String, Object>> theVector= new Vector<HashMap<String, Object>>();
theResults contains this HashMap:
HashMap<String, Object> theHashMap= new HashMap<String, Object>();
theHashMap has these data: (pretend this is a for-loop)
//1st set
theHashMap.put("BLDG_ID", 111); //int
theHashMap.put("EMP_NAME", "AAA"); //String
theHashMap.put("FLAG", true); //boolean
theVector.add(theHashMap);
//2nd set
theHashMap.put("BLDG_ID", 222); //int
theHashMap.put("EMP_NAME", "BBB"); //String
theHashMap.put("FLAG", false); //boolean
theVector.add(theHashMap);
//2nd set<br>
theHashMap.put("BLDG_ID", 111); //int
theHashMap.put("EMP_NAME", "CCC"); //String
theHashMap.put("FLAG", false); //boolean
theVector.add(theHashMap);
I want to sort the contents of my vector of HashMap according to BLDG_ID so that when I display the data it would look like
BLDG_ID || EMP_NAME
111 || AAA
111 || CCC
222 || BBB
How do I do that?