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.
      • 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

      • 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.
      • 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
      • 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.
    • Constructor Detail

      • NoAddReason

        private NoAddReason()
    • 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
      • 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.