public enum AuthUserGender extends Enum<AuthUserGender>
| Enum Constant and Description | 
|---|
| FEMALE | 
| MALEMALE/FAMALE为正常值,通过 getRealGender(String)方法获取真实的性别
 UNKNOWN为容错值,部分平台不会返回用户性别,为了方便统一,使用UNKNOWN标记所有未知或不可测的用户性别信息 | 
| UNKNOWN | 
| Modifier and Type | Method and Description | 
|---|---|
| static AuthUserGender | getRealGender(String originalGender)获取用户的实际性别,常规网站 | 
| static AuthUserGender | getWechatRealGender(String originalGender)获取微信平台用户的实际性别,0表示未定义,1表示男性,2表示女性 | 
| static AuthUserGender | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static AuthUserGender[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final AuthUserGender MALE
getRealGender(String)方法获取真实的性别
 UNKNOWN为容错值,部分平台不会返回用户性别,为了方便统一,使用UNKNOWN标记所有未知或不可测的用户性别信息public static final AuthUserGender FEMALE
public static final AuthUserGender UNKNOWN
public static AuthUserGender[] values()
for (AuthUserGender c : AuthUserGender.values()) System.out.println(c);
public static AuthUserGender 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 AuthUserGender getRealGender(String originalGender)
originalGender - 用户第三方标注的原始性别public static AuthUserGender getWechatRealGender(String originalGender)
originalGender - 用户第三方标注的原始性别Copyright © 2021. All rights reserved.