blackjackanalyst
Enum Card.Rank

java.lang.Object
  extended by java.lang.Enum<Card.Rank>
      extended by blackjackanalyst.Card.Rank
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Card.Rank>
Enclosing class:
Card

public static enum Card.Rank
extends java.lang.Enum<Card.Rank>

The rank of a card.

Author:
Michael Parker

Enum Constant Summary
ACE
           
EIGHT
           
FIVE
           
FOUR
           
JACK
           
KING
           
NINE
           
QUEEN
           
SEVEN
           
SIX
           
TEN
           
THREE
           
TWO
           
 
Method Summary
static Card.Rank valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Card.Rank[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TWO

public static final Card.Rank TWO

THREE

public static final Card.Rank THREE

FOUR

public static final Card.Rank FOUR

FIVE

public static final Card.Rank FIVE

SIX

public static final Card.Rank SIX

SEVEN

public static final Card.Rank SEVEN

EIGHT

public static final Card.Rank EIGHT

NINE

public static final Card.Rank NINE

TEN

public static final Card.Rank TEN

JACK

public static final Card.Rank JACK

QUEEN

public static final Card.Rank QUEEN

KING

public static final Card.Rank KING

ACE

public static final Card.Rank ACE
Method Detail

values

public static final Card.Rank[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Card.Rank c : Card.Rank.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Card.Rank valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name