将枚举存入map集合

遍历枚举存入集合:

Map<String,Object> deptLevel = new HashMap<>();
for(OrgBussinessEnum orgBussinessEnum : OrgBussinessEnum.values()){
    deptLevel.put(orgBussinessEnum.name(),orgBussinessEnum.getType());
}
posted @ 2018-08-23 10:53  super超人  阅读(977)  评论(0编辑  收藏  举报