pref: 增加枚举获取方法

This commit is contained in:
xiaozzzi 2024-04-05 00:35:31 +08:00
parent f25477ffbb
commit 3163046f8c

View File

@ -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;
}
}