net.sf.uadetector.internal.data.domain
Class BrowserType.Builder

java.lang.Object
  extended by net.sf.uadetector.internal.data.domain.BrowserType.Builder
Enclosing class:
BrowserType

@NotThreadSafe
public static final class BrowserType.Builder
extends java.lang.Object


Constructor Summary
BrowserType.Builder()
           
 
Method Summary
 BrowserType build()
          Builds a new instance of BrowserType and returns it.
 BrowserType.Builder setId(int id)
          Sets the identification number (ID).
 BrowserType.Builder setId(java.lang.String id)
          Sets the identification number via a string.
 BrowserType.Builder setName(java.lang.String name)
          Sets the name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrowserType.Builder

public BrowserType.Builder()
Method Detail

build

@Nonnull
public BrowserType build()
Builds a new instance of BrowserType and returns it.

Returns:
a new instance of BrowserType
Throws:
net.sf.qualitycheck.exception.IllegalNegativeArgumentException - if one of the needed arguments to build an instance of BrowserType is invalid
net.sf.qualitycheck.exception.IllegalNullArgumentException - if one of the needed arguments to build an instance of BrowserType is invalid

setId

@Nonnull
public BrowserType.Builder setId(@Nonnegative
                                         int id)
Sets the identification number (ID).

Parameters:
id - ID of browser type

setId

@Nonnull
public BrowserType.Builder setId(@Nonnull
                                         java.lang.String id)
Sets the identification number via a string.

An opening and closing Square brackets at the end of a string will be filtered. If the string can not be parsed as a long, a NumberFormatException will be thrown.

Parameters:
id - ID of browser type

setName

@Nonnull
public BrowserType.Builder setName(@Nonnull
                                           java.lang.String name)
Sets the name.

Parameters:
name - name of the browser type


Copyright © 2011-2014. All Rights Reserved.