1 changed files with 43 additions and 0 deletions
@ -0,0 +1,43 @@ |
|||
package com.epmet.commons.tools.enums; |
|||
|
|||
public enum DemandAnalysisLegendEnum { |
|||
|
|||
/** |
|||
* 环境变量枚举 |
|||
*/ |
|||
VOLUNTEER("volunteer", "志愿者"), |
|||
PARTY_UNIT("party_unit", "联建单位"), |
|||
COMMUNITY_ORG("community_org", "社区自组织"), |
|||
UNFINISHED("unfinished", "未完成"), |
|||
; |
|||
|
|||
private String code; |
|||
private String name; |
|||
|
|||
|
|||
|
|||
DemandAnalysisLegendEnum(String code, String name) { |
|||
this.code = code; |
|||
this.name = name; |
|||
} |
|||
|
|||
public static DemandAnalysisLegendEnum getEnum(String code) { |
|||
DemandAnalysisLegendEnum[] values = DemandAnalysisLegendEnum.values(); |
|||
for (DemandAnalysisLegendEnum value : values) { |
|||
if (value.getCode().equals(code)) { |
|||
return value; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
} |
Loading…
Reference in new issue