public enum SexType extends Enum<SexType>
文件名:SexType.java
用途:定义性别枚举
编码时间:2023年10月8日 上午8:37:37
修改时间:2023年10月8日 上午8:37:37
Modifier and Type | Method and Description |
---|---|
static SexType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SexType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SexType MAN
public static final SexType WOMEN
public static SexType[] values()
for (SexType c : SexType.values()) System.out.println(c);
public static SexType 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 nullCopyright © 2024. All rights reserved.