Package net.sf.freecol.common.model
Enum Unit.UnitState
- java.lang.Object
-
- java.lang.Enum<Unit.UnitState>
-
- net.sf.freecol.common.model.Unit.UnitState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Unit.UnitState>
- Enclosing class:
- Unit
public static enum Unit.UnitState extends java.lang.Enum<Unit.UnitState>
A state a Unit can have.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
UnitState()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getKey()
Get the stem key for this unit state.static Unit.UnitState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Unit.UnitState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ACTIVE
public static final Unit.UnitState ACTIVE
-
FORTIFIED
public static final Unit.UnitState FORTIFIED
-
SENTRY
public static final Unit.UnitState SENTRY
-
IN_COLONY
public static final Unit.UnitState IN_COLONY
-
IMPROVING
public static final Unit.UnitState IMPROVING
-
FORTIFYING
public static final Unit.UnitState FORTIFYING
-
SKIPPED
public static final Unit.UnitState SKIPPED
-
-
Method Detail
-
values
public static Unit.UnitState[] 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 (Unit.UnitState c : Unit.UnitState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Unit.UnitState 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 namejava.lang.NullPointerException
- if the argument is null
-
getKey
public java.lang.String getKey()
Get the stem key for this unit state.- Returns:
- The stem key.
-
-