title: How do I achieve a unique custom collection based on two object property together unique in java
body: <p>How do I achieve a unique custom collection based on two object property together unique.
  Suppose I have lot of custom object and I want a unique collection where the property <code>roll</code> and <code>s_class</code> together should not duplicate of any tow object in this collection.</p>
  
  <pre><code>class Cl {
      private int roll;
      private String s_class;
      private String name;
      private Date dob;
  }
  </code></pre>