public enum Piece extends Enum<Piece>
Enum Constant and Description |
---|
B_BISHOP |
B_KING |
B_KNIGHT |
B_PAWN |
B_QUEEN |
B_ROOK |
NULL |
W_BISHOP |
W_KING |
W_KNIGHT |
W_PAWN |
W_QUEEN |
W_ROOK |
Modifier and Type | Method and Description |
---|---|
static Piece |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Piece[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Piece NULL
public static final Piece W_KING
public static final Piece W_QUEEN
public static final Piece W_ROOK
public static final Piece W_BISHOP
public static final Piece W_KNIGHT
public static final Piece W_PAWN
public static final Piece B_KING
public static final Piece B_QUEEN
public static final Piece B_ROOK
public static final Piece B_BISHOP
public static final Piece B_KNIGHT
public static final Piece B_PAWN
public static Piece[] values()
for (Piece c : Piece.values()) System.out.println(c);
public static Piece 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 nullCopyright © 2020. All rights reserved.