title: ClassCastException in a TreeMap
body: <p>i always get a ClassCastException. I also want to sort the Treemap by the key(pizza.title alphabetical) </p>
  
  <p>Code:</p>
  
  <pre><code>public class Pizza implements Comparable&lt;Pizza&gt; {
  
      public String title;
      public int rate;
      public String date;
      public Bitmap picture;
      public int id;
      @Override
      public int compareTo(Pizza another) {
          // TODO Auto-generated method stub
          return this.title.compareTo(another.title);
      }
  
  }
  </code></pre>
  
  <p>Calling:</p>
  
  <pre><code>for (Pizza pizza : list) {
  
              if(map.containsKey(pizza))
              {
  
                  int i = map.get(pizza.title);
                  map.remove(pizza.title);
  
                  map.put(pizza, i++);
              }
              else
              {
                  map.put(pizza, 1);
              }
            }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>10-04 08:27:19.865: ERROR/AndroidRuntime(722): Caused by: java.lang.ClassCastException: com.korn.pizzacounter.Pizza
  </code></pre>