nl.bitwalker.useragentutils
Enum OperatingSystem

java.lang.Object
  extended by java.lang.Enum<OperatingSystem>
      extended by nl.bitwalker.useragentutils.OperatingSystem
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<OperatingSystem>

public enum OperatingSystem
extends java.lang.Enum<OperatingSystem>

Enum constants for most common operating systems.

Author:
harald

Enum Constant Summary
ANDROID
           
ANDROID1
           
ANDROID2
           
ANDROID2_TABLET
           
ANDROID3_TABLET
           
BLACKBERRY
          BlackBerryOS.
BLACKBERRY6
           
IOS
          iOS4, with the release of the iPhone 4, Apple renamed the OS to iOS.
iOS4_IPHONE
           
LINUX
          Various Linux based operating systems.
MAC_OS
          Older Mac OS systems before Mac OS X
MAC_OS_X
           
MAC_OS_X_IPAD
           
MAC_OS_X_IPHONE
           
MAC_OS_X_IPOD
           
MAEMO
          Linux based Maemo software platform by Nokia.
PALM
           
PSP
           
SERIES40
          Nokia's Series 40 operating system.
SONY_ERICSSON
          Proprietary operating system used for many Sony Ericsson phones.
SUN_OS
           
SYMBIAN
          Other Symbian OS versions
SYMBIAN6
          Symbian OS 6.x versions.
SYMBIAN7
          Symbian OS 7.x versions.
SYMBIAN8
          Symbian OS 8.x versions.
SYMBIAN9
          Symbian OS 9.x versions.
UNKNOWN
           
WEBOS
          PalmOS, exact version unkown
WII
          Nintendo Wii game console.
WINDOWS
          Windows Mobile / Windows CE.
WINDOWS_2000
           
WINDOWS_7
           
WINDOWS_98
           
WINDOWS_MOBILE
           
WINDOWS_MOBILE7
           
WINDOWS_VISTA
           
WINDOWS_XP
           
 
Method Summary
 DeviceType getDeviceType()
           
 OperatingSystem getGroup()
           
 short getId()
           
 Manufacturer getManufacturer()
          Returns the manufacturer of the operating system
 java.lang.String getName()
           
 boolean isInUserAgentString(java.lang.String agentString)
          Checks if the given user-agent string matches to the operating system.
 boolean isMobileDevice()
           
static OperatingSystem parseUserAgentString(java.lang.String agentString)
          Parses user agent string and returns the best match.
static OperatingSystem valueOf(short id)
          Returns the enum constant of this type with the specified id.
static OperatingSystem valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static OperatingSystem[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

WINDOWS

public static final OperatingSystem WINDOWS
Windows Mobile / Windows CE. Exact version unknown.


WINDOWS_7

public static final OperatingSystem WINDOWS_7

WINDOWS_VISTA

public static final OperatingSystem WINDOWS_VISTA

WINDOWS_2000

public static final OperatingSystem WINDOWS_2000

WINDOWS_XP

public static final OperatingSystem WINDOWS_XP

WINDOWS_MOBILE7

public static final OperatingSystem WINDOWS_MOBILE7

WINDOWS_MOBILE

public static final OperatingSystem WINDOWS_MOBILE

WINDOWS_98

public static final OperatingSystem WINDOWS_98

ANDROID

public static final OperatingSystem ANDROID

ANDROID3_TABLET

public static final OperatingSystem ANDROID3_TABLET

ANDROID2

public static final OperatingSystem ANDROID2

ANDROID2_TABLET

public static final OperatingSystem ANDROID2_TABLET

ANDROID1

public static final OperatingSystem ANDROID1

WEBOS

public static final OperatingSystem WEBOS
PalmOS, exact version unkown


PALM

public static final OperatingSystem PALM

IOS

public static final OperatingSystem IOS
iOS4, with the release of the iPhone 4, Apple renamed the OS to iOS.


iOS4_IPHONE

public static final OperatingSystem iOS4_IPHONE

MAC_OS_X_IPAD

public static final OperatingSystem MAC_OS_X_IPAD

MAC_OS_X_IPHONE

public static final OperatingSystem MAC_OS_X_IPHONE

MAC_OS_X_IPOD

public static final OperatingSystem MAC_OS_X_IPOD

MAC_OS_X

public static final OperatingSystem MAC_OS_X

MAC_OS

public static final OperatingSystem MAC_OS
Older Mac OS systems before Mac OS X


MAEMO

public static final OperatingSystem MAEMO
Linux based Maemo software platform by Nokia. Used in the N900 phone. http://maemo.nokia.com/


LINUX

public static final OperatingSystem LINUX
Various Linux based operating systems.


SYMBIAN

public static final OperatingSystem SYMBIAN
Other Symbian OS versions


SYMBIAN9

public static final OperatingSystem SYMBIAN9
Symbian OS 9.x versions. Being used by Nokia (N71, N73, N81, N82, N91, N92, N95, ...)


SYMBIAN8

public static final OperatingSystem SYMBIAN8
Symbian OS 8.x versions. Being used by Nokia (6630, 6680, 6681, 6682, N70, N72, N90).


SYMBIAN7

public static final OperatingSystem 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

public static final OperatingSystem SYMBIAN6
Symbian OS 6.x versions.


SERIES40

public static final OperatingSystem SERIES40
Nokia's Series 40 operating system. Series 60 (S60) uses the Symbian OS.


SONY_ERICSSON

public static final OperatingSystem SONY_ERICSSON
Proprietary operating system used for many Sony Ericsson phones.


SUN_OS

public static final OperatingSystem SUN_OS

PSP

public static final OperatingSystem PSP

WII

public static final OperatingSystem WII
Nintendo Wii game console.


BLACKBERRY

public static final OperatingSystem BLACKBERRY
BlackBerryOS. The BlackBerryOS exists in different version. How relevant those versions are, is not clear.


BLACKBERRY6

public static final OperatingSystem BLACKBERRY6

UNKNOWN

public static final OperatingSystem UNKNOWN
Method Detail

values

public static OperatingSystem[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OperatingSystem c : OperatingSystem.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OperatingSystem valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getId

public short getId()

getName

public java.lang.String getName()

isMobileDevice

public boolean isMobileDevice()

getDeviceType

public DeviceType getDeviceType()

getGroup

public OperatingSystem getGroup()

getManufacturer

public Manufacturer getManufacturer()
Returns the manufacturer of the operating system

Returns:
the manufacturer

isInUserAgentString

public boolean isInUserAgentString(java.lang.String agentString)
Checks if the given user-agent string matches to the operating system. Only checks for one specific operating system.

Parameters:
agentString -
Returns:
boolean

parseUserAgentString

public static OperatingSystem parseUserAgentString(java.lang.String agentString)
Parses user agent string and returns the best match. Returns OperatingSystem.UNKNOWN if there is no match.

Parameters:
agentString -
Returns:
OperatingSystem

valueOf

public static OperatingSystem valueOf(short id)
Returns the enum constant of this type with the specified id. Throws IllegalArgumentException if the value does not exist.

Parameters:
id -
Returns:


Copyright © 2011. All Rights Reserved.