title: Why doesn't java.util.Set have get(int index)?
body: <p>I'm sure there's a good reason, but could someone please explain why the <code>java.util.Set</code> interface lacks <code>get(int Index)</code>, or any similar <code>get()</code> method?</p>
  
  <p>It seems that sets are great for putting things into, but I can't find an elegant way of retrieving a single item from it.</p>
  
  <p>If I know I want the first item, I can use <code>set.iterator().next()</code>, but otherwise it seems I have to cast to an Array to retrieve an item at a specific index?</p>
  
  <p>What are the appropriate ways of retrieving data from a set? (other than using an iterator)</p>
  
  <p>I'm sure the fact that it's excluded from the API means there's a good reason for not doing this -- could someone please enlighten me?</p>
  
  <p><strong>EDIT:</strong>
  Some extremely great answers here, and a few saying "more context".  The specific scenario was a dbUnit test, where I could reasonably assert that the returned set from a query had only 1 item, and I was trying to access that item.</p>
  
  <p>However, the question is more valid without the scenario, as it remains more focussed:</p>
  
  <p><em>What's the difference between set and list</em>.</p>
  
  <p>Thanks to all for the fantastic answers below.</p>