us.the.mac.board
Enum Board.Color
java.lang.Object
java.lang.Enum<Board.Color>
us.the.mac.board.Board.Color
- All Implemented Interfaces:
- Serializable, Comparable<Board.Color>
- Enclosing class:
- Board
public static enum Board.Color
- extends Enum<Board.Color>
The Color enum contains the color of a piece.
For Example: If a piece is White its value will be, Board.Color.WHITE.
|
Method Summary |
static Board.Color |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Board.Color[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
BLACK
public static final Board.Color BLACK
WHITE
public static final Board.Color WHITE
NONE
public static final Board.Color NONE
values
public static Board.Color[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (Board.Color c : Board.Color.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static Board.Color valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null