|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<Phase>
net.sf.colossus.game.Phase
public enum Phase
TODO this should probably start numbering with zero as does the BattlePhase and as does any other Java enum -- currently SPLIT is serialized as "1" TODO instead: now that I added an artificial phase "INIT" (needed during start of the game, otherwise updateStatusScreen tries to do toString on null), - are then the fromInt/toInit still needed?
| Enum Constant Summary | |
|---|---|
FIGHT
|
|
INIT
|
|
MOVE
|
|
MUSTER
|
|
SPLIT
|
|
| Field Summary | |
|---|---|
private java.lang.String |
name
|
| Method Summary | |
|---|---|
static Phase |
fromInt(int i)
Deserialize enum from integer value. |
int |
toInt()
Serialize the object to an integer code. |
java.lang.String |
toString()
Returns a non-localized UI string for the phase. |
static Phase |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Phase[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Phase INIT
public static final Phase SPLIT
public static final Phase MOVE
public static final Phase FIGHT
public static final Phase MUSTER
| Field Detail |
|---|
private final java.lang.String name
| Method Detail |
|---|
public static Phase[] values()
for (Phase c : Phase.values()) System.out.println(c);
public static Phase valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is nullpublic static Phase fromInt(int i)
i - The number for the phase.
ArrayOutOfBoundsException - iff the number is not valid.public int toInt()
public java.lang.String toString()
toString in class java.lang.Enum<Phase>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||