Package net.sf.freecol.common.model
Enum NationOptions.NationState
- java.lang.Object
-
- java.lang.Enum<NationOptions.NationState>
-
- net.sf.freecol.common.model.NationOptions.NationState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<NationOptions.NationState>
,Named
- Enclosing class:
- NationOptions
public static enum NationOptions.NationState extends java.lang.Enum<NationOptions.NationState> implements Named
Nations may be available to all players, to AI players only, or to no players.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AI_ONLY
AVAILABLE
NOT_AVAILABLE
-
Constructor Summary
Constructors Modifier Constructor Description private
NationState()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
getKey()
Get a message key for a nation state.java.lang.String
getNameKey()
Gets the name of this named object.java.lang.String
getShortDescriptionKey()
static NationOptions.NationState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static NationOptions.NationState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AVAILABLE
public static final NationOptions.NationState AVAILABLE
-
AI_ONLY
public static final NationOptions.NationState AI_ONLY
-
NOT_AVAILABLE
public static final NationOptions.NationState NOT_AVAILABLE
-
-
Method Detail
-
values
public static NationOptions.NationState[] 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 (NationOptions.NationState c : NationOptions.NationState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NationOptions.NationState 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
private java.lang.String getKey()
Get a message key for a nation state.- Returns:
- A message key.
-
getShortDescriptionKey
public final java.lang.String getShortDescriptionKey()
-
getNameKey
public final java.lang.String getNameKey()
Gets the name of this named object. Try to avoid using this directly except in i18n-related routines or to implement itself in more complext objects.- Specified by:
getNameKey
in interfaceNamed
- Returns:
- The name of the
Named
.
-
-