TASK:LLM;
This commit is contained in:
@@ -28,4 +28,13 @@ public enum AgeGroup implements IEnumDisplay {
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + value + "]");
|
||||
}
|
||||
|
||||
public static boolean isValidName(String name) {
|
||||
for (AgeGroup ageGroup : AgeGroup.values()) {
|
||||
if (ageGroup.name().equalsIgnoreCase(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,4 +31,13 @@ public enum DesignProcess implements IEnumDisplay {
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + value + "]");
|
||||
}
|
||||
|
||||
public static boolean isValidName(String name) {
|
||||
for (DesignProcess process : DesignProcess.values()) {
|
||||
if (process.name().equalsIgnoreCase(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,15 @@ public enum Position implements IEnumDisplay {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static boolean isValidName(String name) {
|
||||
for (Position position : Position.values()) {
|
||||
if (position.name().equalsIgnoreCase(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
|
||||
@@ -22,6 +22,15 @@ public enum Sex implements IEnumDisplay {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static boolean isValidName(String name) {
|
||||
for (Sex sex : Sex.values()) {
|
||||
if (sex.name().equalsIgnoreCase(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
|
||||
@@ -31,6 +31,15 @@ public enum StyleEnum {
|
||||
this.english = english;
|
||||
}
|
||||
|
||||
public static boolean isValidName(String name) {
|
||||
for (StyleEnum styleEnum : StyleEnum.values()) {
|
||||
if (styleEnum.name().equalsIgnoreCase(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// 获取中文描述
|
||||
public String getChinese() {
|
||||
return chinese;
|
||||
|
||||
Reference in New Issue
Block a user