title: How to get the first element from an enumset in Java?
body: <p>I am having problems with this old project that I am working on. Basically, there's this object that stores an enumset to the database and my problem is I need to get the first element of the stored enumset. Now, before you go bash on me saying that sets don't have a particular order and I should use a list, I'd like to inform you that I can't just change the code because I don't know what kind of effect it will have to other parts of the system. @_@
  The system is around 3-4 years old and I'm the new guy...so, better make a work around. </p>
  
  <p>For example:</p>
  
  <pre><code>Enumset&lt;Protocol&gt; protocolsAvailable;
  </code></pre>
  
  <p>Here is a sample of what it looks like when  protocolAvailable is retrieved from the database:</p>
  
  <pre><code>[ALPHA,BETA,EPSILON]
  </code></pre>
  
  <p>I need to get the first element, which is alpha. I can do it several ways, transform it to a list then use get(index), or I can treat it as a string and use .split(",")[0]... eehh... I don't know, it's getting late, and I guess I'm just looking for better ways of doing it. :></p>