Package megamek.common.equipment
Interface EquipmentFlag
- All Known Implementing Classes:
AmmoTypeFlag,MiscTypeFlag,WeaponTypeFlag
public interface EquipmentFlag
Interface for entity flags, used by
EquipmentBitSet. Allows for easy flag manipulation with enums that
implement this interface. Also provides a default method to convert a single flag to a bitset so multiple flags can
be composed into an EquipmentBitSet.-
Method Summary
Modifier and TypeMethodDescriptiondefault EquipmentBitSetConverts this flag to anEquipmentBitSet.intordinal()Returns the index of the flag in the bitset
-
Method Details
-
ordinal
int ordinal()Returns the index of the flag in the bitset- Returns:
- the index of the flag in the bitset
-
asEquipmentBitSet
Converts this flag to anEquipmentBitSet.- Returns:
- an
EquipmentBitSetwith this flag set
-