title: Return Distinct Object From List
body: <p>Using <code>return new ArrayList(new HashSet(object));</code> should return a list of unique objects. Suppose my object has two variables, say <code>String1</code> and <code>String2</code>. </p>
  
  <p>How would i restructure the code to as to get unique objects based on one of the variables, say <code>String1</code> such that if two items have the same value as the <code>String1</code> variable, only one of them is returned?</p>