Package net.sf.freecol.common.model
Enum ModelMessage.MessageType
- java.lang.Object
-
- java.lang.Enum<ModelMessage.MessageType>
-
- net.sf.freecol.common.model.ModelMessage.MessageType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ModelMessage.MessageType>
,Named
- Enclosing class:
- ModelMessage
public static enum ModelMessage.MessageType extends java.lang.Enum<ModelMessage.MessageType> implements Named
Constants categorizing the type of message. When this changes, be sure to update client-options.xml and the messages file appropriately.
-
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
optionName
-
Constructor Summary
Constructors Modifier Constructor Description private
MessageType(java.lang.String optionName)
-
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 this message type.java.lang.String
getNameKey()
Gets the name of this named object.java.lang.String
getOptionName()
static ModelMessage.MessageType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ModelMessage.MessageType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final ModelMessage.MessageType DEFAULT
-
BUILDING_COMPLETED
public static final ModelMessage.MessageType BUILDING_COMPLETED
-
COMBAT_RESULT
public static final ModelMessage.MessageType COMBAT_RESULT
-
DEMANDS
public static final ModelMessage.MessageType DEMANDS
-
DISASTERS
public static final ModelMessage.MessageType DISASTERS
-
FOREIGN_DIPLOMACY
public static final ModelMessage.MessageType FOREIGN_DIPLOMACY
-
GIFT_GOODS
public static final ModelMessage.MessageType GIFT_GOODS
-
GOODS_MOVEMENT
public static final ModelMessage.MessageType GOODS_MOVEMENT
-
GOVERNMENT_EFFICIENCY
public static final ModelMessage.MessageType GOVERNMENT_EFFICIENCY
-
LOST_CITY_RUMOUR
public static final ModelMessage.MessageType LOST_CITY_RUMOUR
-
MARKET_PRICES
public static final ModelMessage.MessageType MARKET_PRICES
-
MISSING_GOODS
public static final ModelMessage.MessageType MISSING_GOODS
-
SONS_OF_LIBERTY
public static final ModelMessage.MessageType SONS_OF_LIBERTY
-
TUTORIAL
public static final ModelMessage.MessageType TUTORIAL
-
UNIT_ADDED
public static final ModelMessage.MessageType UNIT_ADDED
-
UNIT_ARRIVED
public static final ModelMessage.MessageType UNIT_ARRIVED
-
UNIT_DEMOTED
public static final ModelMessage.MessageType UNIT_DEMOTED
-
UNIT_IMPROVED
public static final ModelMessage.MessageType UNIT_IMPROVED
-
UNIT_LOST
public static final ModelMessage.MessageType UNIT_LOST
-
UNIT_REPAIRED
public static final ModelMessage.MessageType UNIT_REPAIRED
-
WAREHOUSE_CAPACITY
public static final ModelMessage.MessageType WAREHOUSE_CAPACITY
-
WARNING
public static final ModelMessage.MessageType WARNING
-
-
Method Detail
-
values
public static ModelMessage.MessageType[] 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 (ModelMessage.MessageType c : ModelMessage.MessageType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModelMessage.MessageType 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
-
getOptionName
public java.lang.String getOptionName()
-
getKey
private java.lang.String getKey()
Get a message key for this message type.- Returns:
- A message key.
-
getNameKey
public 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
.
-
-