com.dahuatech.icc.brm.enums.MenuTerminal Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk-brm Show documentation
Show all versions of java-sdk-brm Show documentation
Dahua ICC Open API SDK for Java
/*
*
* *********************** 版权声明 ***********************************
*
* 版权所有:浙江大华技术股份有限公司
* ©CopyRight DahuaTech 2019
*
* *********************************************************************
*
*/
package com.dahuatech.icc.brm.enums;
import java.util.Objects;
/**
* 菜单所属终端
*/
public enum MenuTerminal {
ADMIN(1),
CLIENT(2),
APP(3);
private Integer value;
MenuTerminal(Integer value) {
this.value = value;
}
public Integer getValue() {
return value;
}
public static String getName(Integer terminal){
if(terminal == null){
return null;
}
switch (terminal){
case 1 :{
return "管理端";
}
case 2:{
return "客户端";
}
case 3:{
return "移动端";
}
}
return null;
}
public static MenuTerminal forValue(Integer value){
for (MenuTerminal menuTerminal : MenuTerminal.values()) {
if(menuTerminal.getValue().equals(value)){
return menuTerminal;
}
}
return null;
}
}