Interface BattleForceSUAFormatter
- All Known Subinterfaces:
ASCardDisplayable
- All Known Implementing Classes:
AlphaStrikeElement,Formation,MekSummary,SBFFormation,SBFUnit
public interface BattleForceSUAFormatter
This interface is implemented by classes that have knowledge on which BattleForce Special Abilities like SRCH, IT75,
FLK2/2/0/0 or CK12D4 they need to display for themselves and how to format them. This is used to control formatting
of the specials string. For example, when an implementing object is a WS or DA, it will write the doors for its
transport abilities, but as a ground unit it will not. Whenever a
ASSpecialAbilityCollector is called to
write its special abilities using
ASSpecialAbilityCollector.getSpecialsDisplayString(String, BattleForceSUAFormatter), it requires a
BattleForceSUAFormatter to supply the formatting information.-
Method Summary
Modifier and TypeMethodDescriptionformatSUA(BattleForceSUA sua, String delimiter, ASSpecialAbilityCollector collection) Returns the formatted SUA string for the given sua.default booleanshowSUA(BattleForceSUA sua) Returns true when this object wants to have the given SUA displayed among its special abilities.
-
Method Details
-
showSUA
Returns true when this object wants to have the given SUA displayed among its special abilities. This method defaults to returning true and must be overridden when some SUAs are not too displayed.- Returns:
- True when this object wants to have the given sua displayed among its special abilities.
-
formatSUA
Returns the formatted SUA string for the given sua. The given collection can be the specials of the AlphaStrikeElement itself, a turret or an arc of a large aerospace unit. It is required to access related SUAs such as the doors for a transport ability like MT.- Parameters:
sua- The Special Unit Ability to processdelimiter- The delimiter to insert between entries (only relevant for TUR)collection- The SUA collection that the given SUA is part of- Returns:
- The complete formatted Special Unit Ability string such as "LRM1/1/-" or "CK15D2".
-