title: how to sort a vector of hashmaps
body: <p>i have a Vector of Hashmap and the HashMap contains different data types:</p>
  
  <pre><code>Vector&lt;HashMap&lt;String, Object&gt;&gt; theVector= new Vector&lt;HashMap&lt;String, Object&gt;&gt;();
  </code></pre>
  
  <p>theResults contains this HashMap:</p>
  
  <pre><code>HashMap&lt;String, Object&gt; theHashMap= new HashMap&lt;String, Object&gt;();
  </code></pre>
  
  <p>theHashMap has these data:
  (pretend this is a for-loop)</p>
  
  <pre><code>//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&lt;br&gt;
  theHashMap.put("BLDG_ID", 111); //int
  theHashMap.put("EMP_NAME", "CCC"); //String
  theHashMap.put("FLAG", false); //boolean
  
  theVector.add(theHashMap);
  </code></pre>
  
  <p>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<br></p>
  
  <pre><code>BLDG_ID || EMP_NAME
  111     ||    AAA
  111     ||    CCC
  222     ||    BBB
  </code></pre>
  
  <p>How do I do that?</p>