title: How to prevent duplicates of SelectItem in Set collection
body: <p>I am trying to add  SelectItem objects to Set collection. However, duplicate values are being added. Is there any way to prevent these duplicate values? </p>
  
  <pre><code>for(String s: list) {       
    Set&lt;SelectItem&gt; typeSet = new HashSet&lt;SelectItem&gt;();
    typeSet.add(new SelectItem(s));
  }
  </code></pre>