title: Java severity level implementation
body: <p>I have items in a list which can have a severity level ( those levels are: info,warning,error,delay,...)</p>
  
  <p>I want to program this in a OOP way so that I can add more severity levels easily if needed.
  It's been a while since I have used Java so I'm not sure how to do it the right way.</p>
  
  <p>What I have is:</p>
  
  <pre><code>    Public class ListItem
      {
         int sev; 
         String name;
         public ListItem(String name, int s)
         {
            this.name = name; this.sev = s;
         }
         ...
      }
  </code></pre>
  
  <p>A severity should have an integer (like '1') and just a name (like 'information')</p>
  
  <p>I'd like to 'predefine' severities like:</p>
  
  <pre><code>public static final int WARNING = 1;
  public static final int ERROR = 2;
  </code></pre>
  
  <p>But then, how can I display the name 'WARNING' when '1' is given as severity to list item?
  Am I having the best approach?</p>
  
  <p>Thanks,</p>