DeviceComposeEnum.java
806 Bytes
package cn.com.glsx.stdinterface.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum DeviceComposeEnum {
SINGLE_WIRED("010", "单有线"),
TWO_WIRED("020", "双有线"),
SINGLE_WIRELESS("001", "单无线"),
ONE_WIRED_ONE_WIRELESS("011", "单有线+单无线"),
TWO_WIRELESS("002", "双无线"),
ONE_WIRED_TWO_WIRELESS("012", "单有线+双无线"),
THREE_WIRELESS("003", "三无线"),
;
private String code;
private String name;
public static String getNameByCode(String code) {
for (DeviceComposeEnum composeEnum : DeviceComposeEnum.values()) {
if (composeEnum.getCode().equals(code)) {
return composeEnum.getName();
}
}
return "";
}
}