net.japanesechess.record
Enum Handicap
java.lang.Object
java.lang.Enum<Handicap>
net.japanesechess.record.Handicap
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Handicap>
public enum Handicap
- extends java.lang.Enum<Handicap>
|
Field Summary |
private java.lang.String |
s
|
private int |
tokenCount
|
|
Method Summary |
abstract byte[] |
getPackedBoard()
|
int |
getTokenCount()
|
static Handicap |
parseString(java.lang.String handicap)
Used mostly for setting up boards for replay or viewing of the game. |
java.lang.String |
toString()
|
static Handicap |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Handicap[] |
values()
Returns an array containing the constants of this enum type, in
the order they're declared. |
| Methods inherited from class java.lang.Enum |
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
EVEN
public static final Handicap EVEN
SENTE
public static final Handicap SENTE
GOTE
public static final Handicap GOTE
LANCE
public static final Handicap LANCE
BISHOP
public static final Handicap BISHOP
ROOK
public static final Handicap ROOK
ROOK_AND_LANCE
public static final Handicap ROOK_AND_LANCE
TWO_PIECES
public static final Handicap TWO_PIECES
FOUR_PIECES
public static final Handicap FOUR_PIECES
SIX_PIECES
public static final Handicap SIX_PIECES
EIGHT_PIECES
public static final Handicap EIGHT_PIECES
s
private java.lang.String s
tokenCount
private int tokenCount
values
public static final Handicap[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(Handicap c : Handicap.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static Handicap valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Enum<Handicap>
getTokenCount
public int getTokenCount()
getPackedBoard
public abstract byte[] getPackedBoard()
parseString
public static Handicap parseString(java.lang.String handicap)
- Used mostly for setting up boards for replay or viewing of the game.
- Parameters:
handicap -
- Returns: