Enum Class BFSSpecialType
- All Implemented Interfaces:
Serializable,Comparable<BFSSpecialType>,Constable
The registry of Battlefield Support Asset Specials that this build recognizes. Each entry records the canonical code
as printed on the Asset card, whether the Special takes a parameter value, and a human-readable display name.
This registry is the single source of truth used by the editor (to offer a picker of known Specials) and by
rules code (to dispatch Special behavior). Specials not present here are still valid on an Asset: they are
preserved and printed, but have no defined behavior (see BFSSpecial).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<BFSSpecialType> Looks up a known Special by its code, matching the canonical code or any alias case-insensitively and ignoring spaces, hyphens and dots.booleanstatic BFSSpecialTypeReturns the enum constant of this class with the specified name.static BFSSpecialType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_TURRET
-
NIMBLE
-
IMMOBILE
-
INDIRECT_FIRE
-
SPOTTER
-
TAG
-
COMMANDER
-
APC
-
AMS
-
ARTILLERY
-
SWARM
-
ARROW_IV
-
ECM
-
TARGETING_COMPUTER
-
ANTI_INFANTRY
-
CRIT_SEEKER
-
MASH
-
MECHANIZED
-
PROBE
-
REFLECTIVE_ARMOR
-
-
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
-
canonicalCode
- Returns:
- the canonical code as printed on the Asset card (for example
IF,No Turret)
-
takesValue
public boolean takesValue()- Returns:
- true if this Special takes a parameter value (for example
IF X,Artillery (LT))
-
displayName
-
forCode
Looks up a known Special by its code, matching the canonical code or any alias case-insensitively and ignoring spaces, hyphens and dots.- Parameters:
code- the code to look up- Returns:
- the matching registry entry, or empty if the code is not recognized
-