Enum Class SimpleTechLevel

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

public enum SimpleTechLevel extends Enum<SimpleTechLevel>
An enum for the various rules levels
  • Enum Constant Details

  • Method Details

    • values

      public static SimpleTechLevel[] 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 SimpleTechLevel 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
    • parse

      public static SimpleTechLevel parse(String strVal)
    • toString

      public String toString()
      Overrides:
      toString in class Enum<SimpleTechLevel>
    • max

      public static SimpleTechLevel max(SimpleTechLevel l1, SimpleTechLevel l2)
      Returns:
      The more advanced of two tech levels.
    • min

      public static SimpleTechLevel min(SimpleTechLevel l1, SimpleTechLevel l2)
      Returns:
      The less advanced of two tech levels.
    • getCompoundTechLevel

      public int getCompoundTechLevel(boolean clan)
      Returns:
      The corresponding TechConstants.T_* value.
    • convertCompoundToSimple

      public static SimpleTechLevel convertCompoundToSimple(int level)
      Finds simple tech level equivalent of compound tech base/rules level constant
      Parameters:
      level - A TechConstants tech level constant
    • getGameTechLevel

      public static SimpleTechLevel getGameTechLevel(Game game)
    • getAllSimpleTechLevelCodeName

      public static Map<Integer,String> getAllSimpleTechLevelCodeName()