title: Comparing rank in an enum
body: <p>I have the following enum which represents a CardRank </p>
  
  <pre><code>public enum CardRank
  {
      DEUCE('2'), TREY('3'), FOUR('4'), FIVE('5'), SIX('6'), SEVEN('7'),
      EIGHT('8'), NINE('9'), TEN('T'), JACK('J'), QUEEN('Q'), KING('K'), 
      ACE('A');
  
      private char symbol;
  
      private CardRank(char symbol)
      {
          this.symbol = symbol;
      }
  
      public char getSymbol()
      {
          return this.symbol;
      }
  }
  </code></pre>
  
  <p>The <code>CardRank</code> is represented in ascending order. I need to compare the ranks in order to know which rank is greater than the other. I can use <code>&gt;</code> operator with the numerical values but not with the char values. </p>
  
  <pre><code>// this will print out TRUE for all numerical values compared 
  // but FALSE for the chars
  if (card.getRank().getSymbol() &gt; anotherCard.getRank().getSymbol()) {
      System.out.println("true");
  } else {
      System.out.println("false");
  }
  </code></pre>
  
  <p>Any ideas?</p>