Package net.sf.freecol.common.model
Enum UnitLocation.NoAddReason
- java.lang.Object
-
- java.lang.Enum<UnitLocation.NoAddReason>
-
- net.sf.freecol.common.model.UnitLocation.NoAddReason
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<UnitLocation.NoAddReason>
- Enclosing class:
- UnitLocation
public static enum UnitLocation.NoAddReason extends java.lang.Enum<UnitLocation.NoAddReason>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALREADY_PRESENT
Unit is already in the location.ANOTHER_COLONY
Claimed and in use by another of our colonies.CAPACITY_EXCEEDED
Locatable can not be added because the Location is already full.CLAIM_REQUIRED
Either unclaimed or claimed but could be acquired.COLONY_CENTER
Can not add to settlement center tile.MAXIMUM_SKILL
The unit exceeds the maximum skill of this type.MINIMUM_SKILL
The unit does not have the minimum skill required.MISSING_ABILITY
Missing ability to work colony tile or building.MISSING_SKILL
The unit has no skill.NONE
No reason why Locatable can not be added.OCCUPIED_BY_ENEMY
Locatable can not be added because the Location is occupied by objects belonging to another player.OWNED_BY_ENEMY
Locatable can not be added because the Location belongs to another player and does not admit foreign objects.WRONG_TYPE
Locatable can not be added because it has the wrong type.
-
Constructor Summary
Constructors Modifier Constructor Description private
NoAddReason()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescriptionKey()
Get the description key.private java.lang.String
getKey()
Get a message key describing this reason.static UnitLocation.NoAddReason
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static UnitLocation.NoAddReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final UnitLocation.NoAddReason NONE
No reason why Locatable can not be added.
-
ALREADY_PRESENT
public static final UnitLocation.NoAddReason ALREADY_PRESENT
Unit is already in the location.
-
WRONG_TYPE
public static final UnitLocation.NoAddReason WRONG_TYPE
-
CAPACITY_EXCEEDED
public static final UnitLocation.NoAddReason CAPACITY_EXCEEDED
Locatable can not be added because the Location is already full.
-
OCCUPIED_BY_ENEMY
public static final UnitLocation.NoAddReason OCCUPIED_BY_ENEMY
Locatable can not be added because the Location is occupied by objects belonging to another player.
-
OWNED_BY_ENEMY
public static final UnitLocation.NoAddReason OWNED_BY_ENEMY
Locatable can not be added because the Location belongs to another player and does not admit foreign objects.
-
ANOTHER_COLONY
public static final UnitLocation.NoAddReason ANOTHER_COLONY
Claimed and in use by another of our colonies.
-
COLONY_CENTER
public static final UnitLocation.NoAddReason COLONY_CENTER
Can not add to settlement center tile.
-
MISSING_ABILITY
public static final UnitLocation.NoAddReason MISSING_ABILITY
Missing ability to work colony tile or building. Currently only produceInWater, which is assumed by the error message
-
MISSING_SKILL
public static final UnitLocation.NoAddReason MISSING_SKILL
The unit has no skill.
-
MINIMUM_SKILL
public static final UnitLocation.NoAddReason MINIMUM_SKILL
The unit does not have the minimum skill required.
-
MAXIMUM_SKILL
public static final UnitLocation.NoAddReason MAXIMUM_SKILL
The unit exceeds the maximum skill of this type.
-
CLAIM_REQUIRED
public static final UnitLocation.NoAddReason CLAIM_REQUIRED
Either unclaimed or claimed but could be acquired.
-
-
Method Detail
-
values
public static UnitLocation.NoAddReason[] 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 (UnitLocation.NoAddReason c : UnitLocation.NoAddReason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UnitLocation.NoAddReason 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 describing this reason.- Returns:
- A message key.
-
getDescriptionKey
public java.lang.String getDescriptionKey()
Get the description key.- Returns:
- The description key.
-
-