mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
Enum追加
This commit is contained in:
parent
ec7adbe331
commit
19ff824591
|
@ -0,0 +1,30 @@
|
|||
package one.nem.lacerta.model.pref;
|
||||
|
||||
public enum FeatureSwitchOverride {
|
||||
|
||||
ENABLE_DEBUG_MENU("enableDebugMenu"),
|
||||
ENABLE_SEARCH("enableSearch"),
|
||||
SHOW_DISPLAY_MENU("showDisplayMenu"),
|
||||
SHOW_DATA_MENU("showDataMenu"),
|
||||
SHOW_SCAN_MENU("showScanMenu");
|
||||
|
||||
private final String key;
|
||||
|
||||
FeatureSwitchOverride(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public static FeatureSwitchOverride fromKey(String key) {
|
||||
for (FeatureSwitchOverride value : values()) {
|
||||
if (value.getKey().equals(key)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user