Enum Class ASUnitType

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

public enum ASUnitType extends Enum<ASUnitType>
Represents the AlphaStrike Element Types (ASC, page 91)
  • Enum Constant Details

  • Method Details

    • values

      public static ASUnitType[] 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 ASUnitType 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
    • getUnitType

      public static ASUnitType getUnitType(Entity en)
      Returns the AlphaStrike element type for the given entity or UNKNOWN if it has no AS equivalent.
    • isAnyOf

      public boolean isAnyOf(ASUnitType type, ASUnitType... furtherTypes)
      Returns true if this AS Element Type is equal to any of the given Types.
    • isBattleMek

      public boolean isBattleMek()
      Returns:
      True if this ASUnitType is BattleMek (BM).
    • isProtoMek

      public boolean isProtoMek()
      Returns:
      True if this ASUnitType is ProtoMek (PM).
    • isLargeAerospace

      public boolean isLargeAerospace()
      Returns:
      True if this ASUnitType is a Large Aerospace type, i.e. SC, DS, DA, SS, JS, WS.
    • isBattleArmor

      public boolean isBattleArmor()
      Returns:
      True if this ASUnitType is BattleArmor (BA).
    • isConventionalInfantry

      public boolean isConventionalInfantry()
      Returns:
      True if this ASUnitType is Conventional Infantry (CI).
    • isMek

      public boolean isMek()
      Returns:
      True if this ASUnitType is a BattleMek or Industrial Mek type (BM, IM).
    • isInfantry

      public boolean isInfantry()
      Returns:
      True if this ASUnitType is an Infantry type (BA or CI).
    • isCombatVehicle

      public boolean isCombatVehicle()
      Returns:
      True if this ASUnitType is Combat Vehicle (CV).
    • isSupportVehicle

      public boolean isSupportVehicle()
      Returns:
      True if this ASUnitType is Support Vehicle (SV).