You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
595 B
Java
33 lines
595 B
Java
2 years ago
|
package com.engine.organization.enums;
|
||
|
|
||
|
/**
|
||
|
* @Author liang.cheng
|
||
|
* @Date 2023/8/18 4:29 PM
|
||
|
* @Description: 移动端类型
|
||
|
* @Version 1.0
|
||
|
*/
|
||
|
public enum MobileTerminalEnum {
|
||
|
Android,
|
||
|
iPhone,
|
||
|
iPad,
|
||
|
Mobile;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 判断字符串是否包含某个枚举值
|
||
|
* @param str
|
||
|
* @return
|
||
|
*/
|
||
|
public static boolean containsEnumValue(String str) {
|
||
|
for (MobileTerminalEnum myEnum : MobileTerminalEnum.values()) {
|
||
|
if (str.contains(myEnum.toString())) {
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
|