title: Counting sort in java for tuples
body: <p>I am building a class that has a mapping of strings to integers. So if I have 3 apples I would have a mapping of apples to 3.</p>
  
  <p>I need to write a class that sorts the name of the objects by decreasing numbers.</p>
  
  <p>So if I have </p>
  
  <p>(apples, 3)
  (oranges, 2)
  (bananas, 5)</p>
  
  <p>I will get
  (bananas, 5), (apples, 3), (oranges 2)</p>
  
  <p>I was wondering if there's already a class out there that would make my life easier or how I would implement this.</p>
  
  <p>Thanks.</p>