Package me.zhyd.oauth.enums
Enum Class AuthUserGender
- All Implemented Interfaces:
Serializable,Comparable<AuthUserGender>,Constable
用户性别
- Since:
- 1.8
- Author:
- yadong.zhang (yadong.zhang0415(a)gmail.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMALE/FAMALE为正常值,通过getRealGender(String)方法获取真实的性别 UNKNOWN为容错值,部分平台不会返回用户性别,为了方便统一,使用UNKNOWN标记所有未知或不可测的用户性别信息 -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthUserGendergetRealGender(String originalGender) 获取用户的实际性别,常规网站static AuthUserGendergetWechatRealGender(String originalGender) 获取微信平台用户的实际性别,0表示未定义,1表示男性,2表示女性static AuthUserGenderReturns the enum constant of this class with the specified name.static AuthUserGender[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MALE
MALE/FAMALE为正常值,通过getRealGender(String)方法获取真实的性别 UNKNOWN为容错值,部分平台不会返回用户性别,为了方便统一,使用UNKNOWN标记所有未知或不可测的用户性别信息 -
FEMALE
-
UNKNOWN
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getRealGender
获取用户的实际性别,常规网站- Parameters:
originalGender- 用户第三方标注的原始性别- Returns:
- 用户性别
-
getWechatRealGender
获取微信平台用户的实际性别,0表示未定义,1表示男性,2表示女性- Parameters:
originalGender- 用户第三方标注的原始性别- Returns:
- 用户性别
- Since:
- 1.13.2
-