Package megameklab.ui
Enum Class MMLStartUp
- All Implemented Interfaces:
Serializable,Comparable<MMLStartUp>,Constable
This class represents the different types of entry into MML that can be configured in the settings. Options are e.g.
starting with the splash screen main UI (as it has been), trying to load the most recent unit or starting with a new
unit directly.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic MMLStartUpParses the given String, returning the MMLStartUp fitting the String like the valueOf() method does, but returns SPLASH_SCREEN when it can't be parsed (instead of null).static MMLStartUpReturns the enum constant of this class with the specified name.static MMLStartUp[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SPLASH_SCREEN
-
RECENT_UNIT
-
RESTORE_TABS
-
NEW_MEK
-
NEW_TANK
-
NEW_BATTLEARMOR
-
NEW_CONVENTIONAL_INFANTRY
-
NEW_FIGHTER
-
NEW_DROPSHIP
-
NEW_JUMPSHIP
-
NEW_SUPPORT_VEE
-
NEW_PROTOMEK
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getDisplayName
- Returns:
- A display name for this MMLStartUp taken from the resources (possibly localised).
-
parse
Parses the given String, returning the MMLStartUp fitting the String like the valueOf() method does, but returns SPLASH_SCREEN when it can't be parsed (instead of null).- Parameters:
startUpName- A string giving one of the MMLStartUp values- Returns:
- the MMLStartUp parsed from the string or SPLASH_SCREEN. Never returns null.
-