com.dahuatech.icc.assesscontrol.enums.MaskStateEnums Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk-accesscontrol Show documentation
Show all versions of java-sdk-accesscontrol Show documentation
Dahua ICC Open API SDK for Java
The newest version!
package com.dahuatech.icc.assesscontrol.enums;
import java.util.ArrayList;
import java.util.List;
public enum MaskStateEnums {
UNKNOWN("1","未识别"),
WITHOUT_MASK("2","没戴口罩"),
WITH_MASK("3","带口罩")
;
public String code;
public String msg;
MaskStateEnums(String code,String msg){
this.code = code;
this.msg = msg;
}
public static List getTypeList(){
List list = new ArrayList<>();
for(MaskStateEnums item : MaskStateEnums.values()){
list.add(item.code);
}
return list;
}
public static boolean isRight(String type){
if(type == null){
return false;
}
for(MaskStateEnums item : MaskStateEnums.values()){
if(type.equals(item.code)){
return true;
}
}
return false;
}
}