mirror of
https://github.com/blossom-editor/blossom.git
synced 2026-03-12 17:41:26 +08:00
pref: 增加枚举获取方法
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user