public class OS extends UserAgentInfo
Modifier and Type | Field and Description |
---|---|
static List<OS> |
oses
支持的引擎类型
|
static OS |
Unknown
未知
|
NameUnknown
Constructor and Description |
---|
OS(String name,
String regex)
构造
|
OS(String name,
String regex,
String versionRegex)
构造
|
Modifier and Type | Method and Description |
---|---|
static void |
addCustomOs(String name,
String regex,
String versionRegex)
添加自定义的系统类型
|
String |
getVersion(String userAgentString)
获取浏览器版本
|
boolean |
isMacOS()
是否为MacOS
|
equals, getName, getPattern, hashCode, isMatch, isUnknown, toString
public static final OS Unknown
public static void addCustomOs(String name, String regex, String versionRegex)
name
- 浏览器名称regex
- 关键字或表达式versionRegex
- 匹配版本的正则public String getVersion(String userAgentString)
userAgentString
- User-Agent字符串public boolean isMacOS()
Copyright © 2024. All rights reserved.