Serializable
, Comparable<Player.Hand>
@Immutable public static enum Player.Hand extends Enum<Player.Hand>
Inventory
methods.Enum Constant | Description |
---|---|
LEFT |
A player's left hand.
|
RIGHT |
A player's right hand.
|
Modifier and Type | Method | Description |
---|---|---|
String |
toString() |
Returns a human-readable name for this hand, either "Left hand" or
"Right hand".
|
static Player.Hand |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static Player.Hand[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@SerializedName("left") public static final Player.Hand LEFT
@SerializedName("right") public static final Player.Hand RIGHT
public static Player.Hand[] values()
for (Player.Hand c : Player.Hand.values()) System.out.println(c);
public static Player.Hand 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 nullpublic String toString()
toString
in class Enum<Player.Hand>