org.apache.shindig.common.servlet
Class UserAgent

java.lang.Object
  extended by org.apache.shindig.common.servlet.UserAgent

public final class UserAgent
extends Object

Simple class defining basic User-Agent parsing. Defines an interface for a Parser, a list of common Browsers, and an Entry that is consumed by code providing UA-specific behavior.


Nested Class Summary
static class UserAgent.Browser
           
static interface UserAgent.Parser
           
 
Constructor Summary
UserAgent(UserAgent.Browser browser, String version)
           
 
Method Summary
 UserAgent.Browser getBrowser()
           
 String getVersion()
           
 double getVersionNumber()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAgent

public UserAgent(UserAgent.Browser browser,
                 String version)
Method Detail

getBrowser

public UserAgent.Browser getBrowser()
Returns:
Identifying browser string.

getVersion

public String getVersion()
Returns:
Version string of user agent.

getVersionNumber

public double getVersionNumber()
Returns:
Numeric version number, if parseable. Otherwise -1.


Copyright © 2007-2012. All Rights Reserved.