Enum Class BFSAssetType

java.lang.Object
java.lang.Enum<BFSAssetType>
megamek.common.battlefieldSupport.BFSAssetType
All Implemented Interfaces:
Serializable, Comparable<BFSAssetType>, Constable

public enum BFSAssetType extends Enum<BFSAssetType>
The rules category of a Battlefield Support Asset. This is NOT printed on the Asset card, but it must be recorded because some Battlefield Support rules only affect Assets of a particular type.

The asset type is deliberately independent of the Asset's movement mode (EntityMovementMode); unusual combinations such as VTOL-movement infantry are permitted by the data model even where rules for them do not yet exist. Combat and Support vehicles are not distinguished - both are VEHICLE.

  • Enum Constant Details

  • Method Details

    • values

      public static BFSAssetType[] 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

      public static BFSAssetType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • displayName

      public String displayName()
    • fromString

      @Nullable public static BFSAssetType fromString(@Nullable String value)
      Parses the given string into a BFSAssetType, tolerating the enum name, the display name and a handful of common aliases (case-insensitively). Returns null if no match is found.
      Parameters:
      value - the string to parse
      Returns:
      the matching type, or null if unrecognized