com.dahuatech.icc.admin.enums.RecordSourceEnum Maven / Gradle / Ivy
The newest version!
package com.dahuatech.icc.admin.enums;
import java.util.ArrayList;
import java.util.List;
public enum RecordSourceEnum {
ALL("1","全部"),
DEVICE("2","设备"),
SERVICE("3","中心"),
;
private String code;
private String msg;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
RecordSourceEnum(String code, String msg){
this.code = code;
this.msg = msg;
}
public static List getOpenTypeList(){
List list = new ArrayList<>();
for(StreamTypeEnum item : StreamTypeEnum.values()){
list.add(item.code);
}
return list;
}
public static boolean isRight(String type){
if(type == null){
return false;
}
for(StreamTypeEnum item : StreamTypeEnum.values()){
if(type.equals(item.code)){
return true;
}
}
return false;
}
}