Package megamek.client.bot
Enum Class AIType
- All Implemented Interfaces:
Serializable,Comparable<AIType>,Constable
Identifies which bot AI implementation to construct. Used by
BotFactory as the single selection point for
building bots, so callers (lobby, scenario loaders, headless runners) no longer hardcode a concrete bot class.
Additional AI types (for example a future experimental bot) are added here as their implementations land.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic AITypefromString(String value) Parses an AI type from a string (case-insensitive match against the enum name), as used by the scenarioai:key and the/replacePlayer -b:chat argument.static AITypeReturns the enum constant of this class with the specified name.static AIType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
Parses an AI type from a string (case-insensitive match against the enum name), as used by the scenarioai:key and the/replacePlayer -b:chat argument.- Parameters:
value- the string to parse, may benull- Returns:
- the matching
AIType, ornullif the value isnullor matches no type
-