docs: 完善 javadoc

This commit is contained in:
2025-04-03 10:09:18 +08:00
parent 7606a4263c
commit 0f802db105
43 changed files with 1963 additions and 46 deletions

View File

@@ -43,20 +43,41 @@ public enum Gender implements IWithIntCode {
this.displayNameZh = displayNameZh;
}
/**
* 根据码值获取对应枚举
*
* @param value 码值
* @return 枚举值
*/
public static Gender of(int value) {
AssertTools.checkCondition(0 <= value && value < VALUES.length,
() -> new EnumConstantNotPresentException(Gender.class, String.valueOf(value)));
return VALUES[value];
}
/**
* 获取枚举码值
*
* @return 码值
*/
public int getValue() {
return value;
}
/**
* 枚举名称
*
* @return 枚举名称
*/
public String getDisplayName() {
return displayName;
}
/**
* 枚举中文名称
*
* @return 枚举中文名称
*/
public String getDisplayNameZh() {
return displayNameZh;
}