public enum CardValue extends java.lang.Enum<CardValue>
jpleal@fc.up.pt
values()
and valueOf()
are methods
available by default in all enumerations and don't need to be implemented.Enum Constant and Description |
---|
ACE |
JACK |
KING |
QUEEN |
V02 |
V03 |
V04 |
V05 |
V06 |
V07 |
V08 |
V09 |
V10 |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
Represent a value by a short (usually a single character) string.
|
static CardValue |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CardValue[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CardValue V02
public static final CardValue V03
public static final CardValue V04
public static final CardValue V05
public static final CardValue V06
public static final CardValue V07
public static final CardValue V08
public static final CardValue V09
public static final CardValue V10
public static final CardValue QUEEN
public static final CardValue JACK
public static final CardValue KING
public static final CardValue ACE
public static CardValue[] values()
for (CardValue c : CardValue.values()) System.out.println(c);
public static CardValue 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 java.lang.String toString()
toString
in class java.lang.Enum<CardValue>