K/V式枚举

 1 public enum OType {
 2                             LOGIN {
 3                                 public String getDesc() {
 4                                     return "登录";
 5                                 }
 6                             },
 7                             ADD {
 8                                 public String getDesc() {
 9                                     return "增加";
10                                 }
11                             },
12                             MOD {
13                                 public String getDesc() {
14                                     return "修改";
15                                 }
16                             },
17                             DEL {
18                                 public String getDesc() {
19                                     return "删除";
20                                 }
21                             },
22                             GRT {
23                                 public String getDesc() {
24                                     return "授权";
25                                 }
26                             },
27                             EXPORT {
28                                 public String getDesc() {
29                                     return "导出";
30                                 }
31                             },
32                             IMPORT {
33                                 public String getDesc() {
34                                     return "导入";
35                                 }
36                             },
37                             SYN {
38                                 public String getDesc() {
39                                     return "同步";
40                                 }
41                             };
42     public abstract String getDesc();
43 }

猜你喜欢

转载自www.cnblogs.com/live365wang/p/9256842.html
今日推荐