net.sf.uadetector
Class DeviceCategory

java.lang.Object
  extended by net.sf.uadetector.DeviceCategory
All Implemented Interfaces:
java.io.Serializable, ReadableDeviceCategory

@Immutable
public final class DeviceCategory
extends java.lang.Object
implements ReadableDeviceCategory, java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
static class DeviceCategory.Builder
           
 
Nested classes/interfaces inherited from interface net.sf.uadetector.ReadableDeviceCategory
ReadableDeviceCategory.Category
 
Field Summary
static DeviceCategory EMPTY
          Represents a not set device category.
 
Constructor Summary
DeviceCategory(ReadableDeviceCategory.Category category, java.lang.String icon, java.lang.String infoUrl, java.lang.String name)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 ReadableDeviceCategory.Category getCategory()
          Gets the enum value of a category.
 java.lang.String getIcon()
          Gets the icon of the category.
 java.lang.String getInfoUrl()
          Returns the URL to get more informations behind a category.
 java.lang.String getName()
          Gets the category name.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final DeviceCategory EMPTY
Represents a not set device category.

Constructor Detail

DeviceCategory

public DeviceCategory(@Nonnull
                      ReadableDeviceCategory.Category category,
                      @Nonnull
                      java.lang.String icon,
                      @Nonnull
                      java.lang.String infoUrl,
                      @Nonnull
                      java.lang.String name)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getCategory

@Nonnull
public ReadableDeviceCategory.Category getCategory()
Description copied from interface: ReadableDeviceCategory
Gets the enum value of a category.

It provides all known device categories at the time of implementing this and makes it easier and type-safe to query for a specific one rather the comparing the name.

Specified by:
getCategory in interface ReadableDeviceCategory
Returns:
enum value of a category

getIcon

@Nonnull
public java.lang.String getIcon()
Description copied from interface: ReadableDeviceCategory
Gets the icon of the category.

Specified by:
getIcon in interface ReadableDeviceCategory
Returns:
icon of the category

getInfoUrl

@Nonnull
public java.lang.String getInfoUrl()
Description copied from interface: ReadableDeviceCategory
Returns the URL to get more informations behind a category.

Specified by:
getInfoUrl in interface ReadableDeviceCategory
Returns:
information URL

getName

@Nonnull
public java.lang.String getName()
Description copied from interface: ReadableDeviceCategory
Gets the category name.

Specified by:
getName in interface ReadableDeviceCategory
Returns:
name of the category

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011-2014. All Rights Reserved.