title: group by like structure using java maps/lists
body: <p>I would like to implement a fast "group by" like feature in Java.
  I have a <code>List&lt;List&lt;String&gt;&gt;</code> and I want to iterate through based on groupping on different indexes.</p>
  
  <p>For example:</p>
  
  <pre><code>A1 B1 C1 value_1 A1 B1 C2 value_2 A1 B2 C1 value_3  A1 B2 C2 value_4
  </code></pre>
  
  <p>I want some aggregations using groupping on first and third column.
  And I want it to be fast - avoid calculating every sum at every query.
  The values from the "table" are changing constantly.
  Any thoughts?</p>