title: How to group the values from map based on some particualar values?
body: <p>I have values coming from map like the following </p>
  
  <pre><code>Key = 1_1, Value = 02/04/2012
  Key = 1_2, Value = 03/04/2012
  Key = 1_3, Value = 04/04/2012
  Key = 1_4, Value = 05/04/2012
  Key = 1_5, Value = 06/04/2012
  Key = 1_6, Value = 09/04/2012
  Key = 1_7, Value = 10/04/2012
  Key = 1_8, Value = 11/04/2012
  Key = 1_9, Value = 12/04/2012
  Key = 1_10, Value = 13/04/2012
  Key = 1_11, Value = 18/04/2012
  Key = 1_12, Value = 19/04/2012
  Key = 1_13, Value = 20/04/2012
  Key = 1_14, Value = 23/04/2012
  Key = 1_15, Value = 24/04/2012
  Key = 1_16, Value = 25/04/2012
  Key = 1_17, Value = 26/04/2012
  Key = 1_18, Value = 27/04/2012
  Key = 1_19, Value = 30/04/2012
  Key = 10_20, Value = 02/04/2012
  Key = 10_21, Value = 03/04/2012
  Key = 10_22, Value = 04/04/2012
  Key = 10_23, Value = 05/04/2012
  Key = 10_24, Value = 06/04/2012
  Key = 10_25, Value = 09/04/2012
  Key = 10_26, Value = 10/04/2012
  Key = 10_27, Value = 11/04/2012
  Key = 10_28, Value = 12/04/2012
  Key = 10_29, Value = 13/04/2012
  Key = 10_30, Value = 16/04/2012
  Key = 10_31, Value = 17/04/2012
  Key = 10_32, Value = 18/04/2012
  Key = 10_33, Value = 19/04/2012
  Key = 10_34, Value = 23/04/2012
  Key = 10_35, Value = 24/04/2012
  Key = 10_36, Value = 26/04/2012
  Key = 10_37, Value = 27/04/2012
  </code></pre>
  
  <p>I am really struggling to separate these values and put them in separate map.</p>
  
  <p>i would like to group as follows.</p>
  
  <p>1_1 to 1_19 this i want to split based on "_" and get the first value alone and group them in to a separate map.</p>
  
  <p>like 1 is key and the value will be the date.</p>
  
  <p>EDIT:</p>
  
  <pre><code>employeeMap =  showExelData(sheetData);
          String previousEemployeeID = "",employeeID[];
          Iterator&lt;Map.Entry&gt; entries = employeeMap.entrySet().iterator();
          while (entries.hasNext()) {
              Map.Entry entry = entries.next();
              employeeID = entry.getKey().toString().split("_");
  
                  // this is the place where i want to check the values if 1 than group the values it can be even  Key = 1_0, Value = 25/04/2012 to  If Key = 1_18, Value = 30/04/2012
       but when the other one comes ex :  Key = 10_0, Value = 25/04/2012 to  If Key = 10_17, Value = 30/04/2012it has to go to new Map 
  </code></pre>
  
  <p>this is the place where i am lacking.
          }</p>