public enum CardSuit extends Enum<CardSuit>
Enum Constant and Description |
---|
CLUBS
The suit of clubs.
|
DIAMONDS
The suit of diamonds.
|
HEARTS
The suit of hearts.
|
SPADES
The suit of spades.
|
Modifier and Type | Method and Description |
---|---|
static CardSuit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CardSuit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static CardSuit[] values()
for (CardSuit c : CardSuit.values()) System.out.println(c);
public static CardSuit valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is null