Package ball.game.chess
Enum Piece.Rank
- java.lang.Object
-
- java.lang.Enum<Piece.Rank>
-
- ball.game.chess.Piece.Rank
-
- All Implemented Interfaces:
Serializable,Comparable<Piece.Rank>
- Enclosing class:
- Piece
public static enum Piece.Rank extends Enum<Piece.Rank>
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Piece.RankvalueOf(String name)Returns the enum constant of this type with the specified name.static Piece.Rank[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
K
public static final Piece.Rank K
-
Q
public static final Piece.Rank Q
-
R
public static final Piece.Rank R
-
B
public static final Piece.Rank B
-
N
public static final Piece.Rank N
-
P
public static final Piece.Rank P
-
-
Method Detail
-
values
public static Piece.Rank[] 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 (Piece.Rank c : Piece.Rank.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Piece.Rank 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 nameNullPointerException- if the argument is null
-
-