mirror of
https://github.com/blossom-editor/blossom
synced 2024-11-17 14:39:21 +08:00
pref: 增加枚举获取方法
This commit is contained in:
parent
f25477ffbb
commit
3163046f8c
@ -42,4 +42,13 @@ public enum YesNo {
|
||||
}
|
||||
return NO.aBoolean;
|
||||
}
|
||||
|
||||
public static YesNo getValue(Integer value) {
|
||||
for (YesNo yesNo : YesNo.values()) {
|
||||
if (yesNo.getValue().equals(value)) {
|
||||
return yesNo;
|
||||
}
|
||||
}
|
||||
return YesNo.NO;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user