Enum Class OperatingSystem
- 所有已实现的接口:
Serializable,Comparable<OperatingSystem>,java.lang.constant.Constable
Enum constants for most common operating systems.
- 作者:
- harald
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
枚举常量概要
枚举常量枚举常量说明Generic Android mobile device without OS version number informationGeneric Android tablet device without OS version number informationBada is a mobile operating system being developed by Samsung Electronics.BlackBerryOS.Chrome OS by Google, mostly used on Chromebooks and ChromeboxesGoogle TV uses Android 2.x or 3.x but doesn't identify itself as Android.iOS4, with the release of the iPhone 4, Apple renamed the OS to iOS.Various Linux based operating systems.Older Mac OS systems before Mac OS XLinux based Maemo software platform by Nokia.Proxy server that hides the original user-agent.Nokia's Series 40 operating system.Proprietary operating system used for many Sony Ericsson phones.Other Symbian OS versionsSymbian OS 6.x versions.Symbian OS 7.x versions.Symbian OS 8.x versions.Symbian OS 9.x versions.Tizen is a Linux Foundation project.PalmOS, exact version unkownNintendo Wii game console.Windows Mobile / Windows CE. -
方法概要
修饰符和类型方法说明getGroup()shortgetId()Returns the manufacturer of the operating systemgetName()booleanisInUserAgentString(String agentString) Checks if the given user-agent string matches to the operating system.boolean已过时。static OperatingSystemparseUserAgentLowercaseString(String agentString) static OperatingSystemparseUserAgentString(String agentString) Parses user agent string and returns the best match.static OperatingSystemparseUserAgentString(String agentString, List<OperatingSystem> operatingSystems) Parses the user agent string and returns the best match for the given operating systems.static OperatingSystemvalueOf(short id) Returns the enum constant of this type with the specified id.static OperatingSystemReturns the enum constant of this class with the specified name.static OperatingSystem[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
枚举常量详细资料
-
WINDOWS
Windows Mobile / Windows CE. Exact version unknown. -
WINDOWS_10
-
WINDOWS_81
-
WINDOWS_8
-
WINDOWS_7
-
WINDOWS_VISTA
-
WINDOWS_2000
-
WINDOWS_XP
-
WINDOWS_10_MOBILE
-
WINDOWS_PHONE8_1
-
WINDOWS_PHONE8
-
WINDOWS_MOBILE7
-
WINDOWS_MOBILE
-
WINDOWS_98
-
XBOX_OS
-
ANDROID
-
ANDROID8
-
ANDROID8_TABLET
-
ANDROID7
-
ANDROID7_TABLET
-
ANDROID6
-
ANDROID6_TABLET
-
ANDROID5
-
ANDROID5_TABLET
-
ANDROID4
-
ANDROID4_TABLET
-
ANDROID4_WEARABLE
-
ANDROID3_TABLET
-
ANDROID2
-
ANDROID2_TABLET
-
ANDROID1
-
ANDROID_MOBILE
Generic Android mobile device without OS version number information -
ANDROID_TABLET
Generic Android tablet device without OS version number information -
CHROME_OS
Chrome OS by Google, mostly used on Chromebooks and Chromeboxes -
WEBOS
PalmOS, exact version unkown -
PALM
-
MEEGO
-
IOS
iOS4, with the release of the iPhone 4, Apple renamed the OS to iOS. -
iOS11_IPHONE
-
iOS10_IPHONE
-
iOS9_IPHONE
-
iOS8_4_IPHONE
-
iOS8_3_IPHONE
-
iOS8_2_IPHONE
-
iOS8_1_IPHONE
-
iOS8_IPHONE
-
iOS7_IPHONE
-
iOS6_IPHONE
-
iOS5_IPHONE
-
iOS4_IPHONE
-
MAC_OS_X_IPAD
-
iOS11_IPAD
-
iOS10_IPAD
-
iOS9_IPAD
-
iOS8_4_IPAD
-
iOS8_3_IPAD
-
iOS8_2_IPAD
-
iOS8_1_IPAD
-
iOS8_IPAD
-
iOS7_IPAD
-
iOS6_IPAD
-
MAC_OS_X_IPHONE
-
MAC_OS_X_IPOD
-
MAC_OS_X
-
MAC_OS
Older Mac OS systems before Mac OS X -
MAEMO
Linux based Maemo software platform by Nokia. Used in the N900 phone. http://maemo.nokia.com/ -
BADA
Bada is a mobile operating system being developed by Samsung Electronics. -
GOOGLE_TV
Google TV uses Android 2.x or 3.x but doesn't identify itself as Android. -
TIZEN
Tizen is a Linux Foundation project. Mostly used by various Samsung devices.- 另请参阅:
-
- Tizen Browser user-agent format
- Samsung Internet User-Agent String Format Not specified how devices like car display or a fridge would identify themselves.
-
TIZEN3
-
TIZEN3_MOBILE
-
TIZEN3_TV
-
TIZEN2
-
TIZEN2_MOBILE
-
TIZEN2_TV
-
TIZEN_MOBILE
-
KINDLE
Various Linux based operating systems. -
KINDLE3
-
KINDLE2
-
LINUX
-
UBUNTU
-
UBUNTU_TOUCH_MOBILE
-
LINUX_SMART_TV
-
SYMBIAN
Other Symbian OS versions -
SYMBIAN9
Symbian OS 9.x versions. Being used by Nokia (N71, N73, N81, N82, N91, N92, N95, ...) -
SYMBIAN8
Symbian OS 8.x versions. Being used by Nokia (6630, 6680, 6681, 6682, N70, N72, N90). -
SYMBIAN7
Symbian OS 7.x versions. Being used by Nokia (3230, 6260, 6600, 6620, 6670, 7610), Panasonic (X700, X800), Samsung (SGH-D720, SGH-D730) and Lenovo (P930). -
SYMBIAN6
Symbian OS 6.x versions. -
SERIES40
Nokia's Series 40 operating system. Series 60 (S60) uses the Symbian OS. -
SONY_ERICSSON
Proprietary operating system used for many Sony Ericsson phones. -
SUN_OS
-
PSP
-
WII
Nintendo Wii game console. -
BLACKBERRY
BlackBerryOS. The BlackBerryOS exists in different version. How relevant those versions are, is not clear. -
BLACKBERRY7
-
BLACKBERRY6
-
BLACKBERRY_TABLET
-
ROKU
-
PROXY
Proxy server that hides the original user-agent. ggpht.com = Gmail proxy server -
UNKNOWN_MOBILE
-
UNKNOWN_TABLET
-
UNKNOWN
-
-
方法详细资料
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- 返回:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- 如果参数为空值
-
parseUserAgentString
Parses user agent string and returns the best match. Returns OperatingSystem.UNKNOWN if there is no match.- 参数:
agentString- User-agent string as provided in the request.- 返回:
- OperatingSystem enum
-
parseUserAgentLowercaseString
-
parseUserAgentString
public static OperatingSystem parseUserAgentString(String agentString, List<OperatingSystem> operatingSystems) Parses the user agent string and returns the best match for the given operating systems. Returns OperatingSystem.UNKNOWN if there is no match. Be aware that if the order of the provided operating systems is incorrect or the set is too limited it can lead to false matches!- 参数:
agentString- User-agent string as provided in the request.- 返回:
- OperatingSystem enum
-
valueOf
Returns the enum constant of this type with the specified id. Throws IllegalArgumentException if the value does not exist.- 参数:
id- Id value of the operating system.- 返回:
- OperatingSystem enum
-
getId
public short getId() -
getName
-
isMobileDevice
已过时。 -
getDeviceType
-
getGroup
-
getManufacturer
Returns the manufacturer of the operating system- 返回:
- the manufacturer
-
isInUserAgentString
Checks if the given user-agent string matches to the operating system. Only checks for one specific operating system.- 参数:
agentString- User-agent string as provided in the request.- 返回:
- boolean
-