net.sf.freecol.common.model
Enum UnitLocation.NoAddReason

java.lang.Object
  extended by java.lang.Enum<UnitLocation.NoAddReason>
      extended by 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
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.
MISSING_ABILITY
          Missing ability to work colony tile.
MISSING_SKILL
          Missing skill to work colony tile.
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.
 
Method Summary
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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
Locatable can not be added because it has the wrong type. E.g. a Building can not be added to a Unit.


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. Currently only produceInWater, which is assumed by the error message


MISSING_SKILL

public static final UnitLocation.NoAddReason MISSING_SKILL
Missing skill to work colony tile.


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 name
java.lang.NullPointerException - if the argument is null