NIMSDK-AOS  10.5.0
UserInfoFieldEnum.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.uinfo.constant;
2 
3 import com.netease.nimlib.biz.constant.IUserService;
4 
8 public enum UserInfoFieldEnum {
12  undefined(-1, null),
13 
17  Name(IUserService.UserInfoTag.NAME, String.class),
18 
22  AVATAR(IUserService.UserInfoTag.ICON, String.class),
23 
27  SIGNATURE(IUserService.UserInfoTag.SIGN, String.class),
28 
32  GENDER(IUserService.UserInfoTag.GENDER, Integer.class),
33 
37  EMAIL(IUserService.UserInfoTag.EMAIL, String.class),
38 
42  BIRTHDAY(IUserService.UserInfoTag.BIRTH, String.class),
43 
47  MOBILE(IUserService.UserInfoTag.MOBILE, String.class),
48 
52  EXTEND(IUserService.UserInfoTag.EX, String.class);
53 
54  private int value;
55  private Class<? extends Object> fieldType;
56 
57  UserInfoFieldEnum(int value, Class<? extends Object> fieldType) {
58  this.value = value;
59  this.fieldType = fieldType;
60  }
61 
62  public static UserInfoFieldEnum typeOfValue(int value) {
63  for (UserInfoFieldEnum type : values()) {
64  if (type.value == value) {
65  return type;
66  }
67  }
68  return undefined;
69  }
70 
71  public int getValue() {
72  return value;
73  }
74 
75  public Class<? extends Object> getFieldType() {
76  return fieldType;
77  }
78 
79 }
UserInfoFieldEnum(int value, Class<? extends Object > fieldType)