toInt static method

int toInt(
  1. RoleEnum value
)

转换为常量类型 value 角色枚举 Return 转换结果

Implementation

static int toInt(RoleEnum value) {
  switch (value) {
    case RoleEnum.Anchor:
      return 20;
    case RoleEnum.Audience:
      return 21;
  }
}