title: Java - Make an object collection friendly
body: <p>If an object holds a unique primary key, what interfaces does it need to implement in order to be collection friendly especially in terms of being efficiently sortable, hashable, etc...?</p>
  
  <p>If the primary key is a string, how are these interfaces best implemented?</p>
  
  <p>Thanks!</p>