Enum Constant and Description |
---|
Club |
Diamond |
Excuse |
Heart |
Spade |
Trump |
Modifier and Type | Method and Description |
---|---|
static Suit |
randomSuit()
Get a random suit among enum ones
|
static Suit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Suit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Suit Spade
public static final Suit Heart
public static final Suit Trump
public static final Suit Diamond
public static final Suit Club
public static final Suit Excuse
public static Suit[] values()
for (Suit c : Suit.values()) System.out.println(c);
public static Suit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static Suit randomSuit()
Random