public enum Gender extends Enum<Gender> implements IWithIntCode
| Modifier and Type | Method and Description |
|---|---|
int |
getCode()
获取码值
|
String |
getDisplayName()
枚举名称
|
String |
getDisplayNameZh()
枚举中文名称
|
int |
getValue()
获取枚举码值
|
static Gender |
of(int value)
根据码值获取对应枚举
|
static Gender |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Gender[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfisCodeEquals, isSameCodeAs, isSameCodeAs, isSameCodeAspublic static final Gender UNKNOWN
public static final Gender MALE
public static final Gender FEMALE
public static Gender[] values()
for (Gender c : Gender.values()) System.out.println(c);
public static Gender valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static Gender of(int value)
value - 码值public int getValue()
public String getDisplayName()
public String getDisplayNameZh()
public int getCode()
IWithIntCodegetCode in interface IWithIntCodeCopyright © 2026. All rights reserved.