package cn.palmte.work.bean; /** * @author xiongshiyan at 2021/11/1 , contact me with email yanshixiong@126.com or phone 15208384257 */ public enum IsSecondEnum { PLAN_A(1,"是"), PLAN_B(2,"否"); private int isSecond; private String isSecondStr; private IsSecondEnum(int isSecond, String isSecondStr) { this.isSecond = isSecond; this.isSecondStr = isSecondStr; } public int getIsSecond() { return isSecond; } public void setIsSecond(int isSecond) { this.isSecond = isSecond; } public String getIsSecondStr() { return isSecondStr; } public void setIsSecondStr(String isSecondStr) { this.isSecondStr = isSecondStr; } public static IsSecondEnum parseIsSecond(int isSecond){ if(isSecond == 1){ return PLAN_A; } if(isSecond == 2){ return PLAN_B; } throw new IllegalArgumentException("Unkown isSecond:"+isSecond); } }