title: TreeMap remove not working
body: <p>I have a TreeMap with a number of entries. </p>
  
  <pre><code>TreeMap&lt;Long, List&lt;Payment&gt;&gt; myPaymentsForYear;
  </code></pre>
  
  <p>To remove the first week from the Map, I do</p>
  
  <pre><code> private void removeDaysFromPast() {
      for (int i = 0; i &lt; WEEK; i++) {
          long key = myPaymentsForYear().firstKey();
          myPaymentsForYear.remove(key);
      }
      System.out.println( "date: " + new Date(myPaymentsForYear.firstKey()).toString());
  }
  </code></pre>
  
  <p>However, the printed statement always shows that the firstKey has not been removed. I fact, non of the seven elements is removed. Does anyone know why?</p>