net.sf.uadetector
Class UserAgent.Builder

java.lang.Object
  extended by net.sf.uadetector.UserAgent.Builder
All Implemented Interfaces:
ReadableUserAgent
Enclosing class:
UserAgent

public static final class UserAgent.Builder
extends java.lang.Object
implements ReadableUserAgent


Constructor Summary
UserAgent.Builder()
           
UserAgent.Builder(java.lang.String userAgentString)
           
 
Method Summary
 UserAgent build()
           
 DeviceCategory getDeviceCategory()
          Gets the detected device category.
 UserAgentFamily getFamily()
          Gets the family of an user agent.
 java.lang.String getIcon()
          Gets the icon name of an user agent.
 java.lang.String getName()
          Gets the name of an user agent.
 OperatingSystem getOperatingSystem()
          Gets the operating system on which the user agent is running.
 java.lang.String getProducer()
          Returns the manufacturer of an user agent.
 java.lang.String getProducerUrl()
          Returns the URL to the main website of the manufacturer of an user agent.
 UserAgentType getType()
          Returns the type of an user agent, for example, mobile browser or email client.
 java.lang.String getTypeName()
          Returns the type name of an user agent, for example, mobile browser or email client.
 java.lang.String getUrl()
          Returns the URL to the product or information page of an user agent.
 java.lang.String getUserAgentString()
           
 VersionNumber getVersionNumber()
          Gets the version number of an user agent.
 UserAgent.Builder setDeviceCategory(DeviceCategory deviceCategory)
           
 UserAgent.Builder setFamily(UserAgentFamily family)
           
 UserAgent.Builder setIcon(java.lang.String icon)
           
 UserAgent.Builder setName(java.lang.String name)
           
 UserAgent.Builder setOperatingSystem(OperatingSystem operatingSystem)
           
 UserAgent.Builder setOperatingSystem(ReadableOperatingSystem os)
           
 UserAgent.Builder setProducer(java.lang.String producer)
           
 UserAgent.Builder setProducerUrl(java.lang.String producerUrl)
           
 UserAgent.Builder setType(UserAgentType type)
           
 UserAgent.Builder setTypeName(java.lang.String typeName)
           
 UserAgent.Builder setUrl(java.lang.String url)
           
 UserAgent.Builder setUserAgentString(java.lang.String userAgentString)
           
 UserAgent.Builder setVersionNumber(VersionNumber versionNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAgent.Builder

public UserAgent.Builder()

UserAgent.Builder

public UserAgent.Builder(@Nonnull
                         java.lang.String userAgentString)
Method Detail

build

@Nonnull
public UserAgent build()

getDeviceCategory

public DeviceCategory getDeviceCategory()
Description copied from interface: ReadableUserAgent
Gets the detected device category.

Specified by:
getDeviceCategory in interface ReadableUserAgent
Returns:
detected device category

getFamily

public UserAgentFamily getFamily()
Description copied from interface: ReadableUserAgent
Gets the family of an user agent.

Specified by:
getFamily in interface ReadableUserAgent
Returns:
family of an user agent

getIcon

public java.lang.String getIcon()
Description copied from interface: ReadableUserAgent
Gets the icon name of an user agent.

Specified by:
getIcon in interface ReadableUserAgent
Returns:
icon name of an user agent

getName

public java.lang.String getName()
Description copied from interface: ReadableUserAgent
Gets the name of an user agent.

Specified by:
getName in interface ReadableUserAgent
Returns:
name of an user agent

getOperatingSystem

public OperatingSystem getOperatingSystem()
Description copied from interface: ReadableUserAgent
Gets the operating system on which the user agent is running.

Specified by:
getOperatingSystem in interface ReadableUserAgent
Returns:
the running operating system

getProducer

public java.lang.String getProducer()
Description copied from interface: ReadableUserAgent
Returns the manufacturer of an user agent.

Specified by:
getProducer in interface ReadableUserAgent
Returns:
the manufacturer

getProducerUrl

public java.lang.String getProducerUrl()
Description copied from interface: ReadableUserAgent
Returns the URL to the main website of the manufacturer of an user agent.

Specified by:
getProducerUrl in interface ReadableUserAgent
Returns:
URL to the website of the manufacturer

getType

public UserAgentType getType()
Description copied from interface: ReadableUserAgent
Returns the type of an user agent, for example, mobile browser or email client.

Specified by:
getType in interface ReadableUserAgent
Returns:
the type of an user agent

getTypeName

public java.lang.String getTypeName()
Description copied from interface: ReadableUserAgent
Returns the type name of an user agent, for example, mobile browser or email client.

Specified by:
getTypeName in interface ReadableUserAgent
Returns:
the type name of an user agent

getUrl

public java.lang.String getUrl()
Description copied from interface: ReadableUserAgent
Returns the URL to the product or information page of an user agent.

Specified by:
getUrl in interface ReadableUserAgent
Returns:
the URL to the product page

getUserAgentString

public java.lang.String getUserAgentString()

getVersionNumber

public VersionNumber getVersionNumber()
Description copied from interface: ReadableUserAgent
Gets the version number of an user agent.

Specified by:
getVersionNumber in interface ReadableUserAgent
Returns:
version number of an user agent

setDeviceCategory

@Nonnull
public UserAgent.Builder setDeviceCategory(@Nonnull
                                                   DeviceCategory deviceCategory)

setFamily

@Nonnull
public UserAgent.Builder setFamily(@Nonnull
                                           UserAgentFamily family)

setIcon

@Nonnull
public UserAgent.Builder setIcon(@Nonnull
                                         java.lang.String icon)

setName

@Nonnull
public UserAgent.Builder setName(@Nonnull
                                         java.lang.String name)

setOperatingSystem

@Nonnull
public UserAgent.Builder setOperatingSystem(@Nonnull
                                                    OperatingSystem operatingSystem)

setOperatingSystem

@Nonnull
public UserAgent.Builder setOperatingSystem(@Nonnull
                                                    ReadableOperatingSystem os)

setProducer

@Nonnull
public UserAgent.Builder setProducer(@Nonnull
                                             java.lang.String producer)

setProducerUrl

@Nonnull
public UserAgent.Builder setProducerUrl(@Nonnull
                                                java.lang.String producerUrl)

setType

@Nonnull
public UserAgent.Builder setType(@Nonnull
                                         UserAgentType type)

setTypeName

@Nonnull
public UserAgent.Builder setTypeName(@Nonnull
                                             java.lang.String typeName)

setUrl

@Nonnull
public UserAgent.Builder setUrl(@Nonnull
                                        java.lang.String url)

setUserAgentString

@Nonnull
public UserAgent.Builder setUserAgentString(@Nonnull
                                                    java.lang.String userAgentString)

setVersionNumber

@Nonnull
public UserAgent.Builder setVersionNumber(@Nonnull
                                                  VersionNumber versionNumber)


Copyright © 2011-2014. All Rights Reserved.