org.fourthline.cling.model.types

## Class DeviceType

- java.lang.Object
- - org.fourthline.cling.model.types.DeviceType

- Direct Known Subclasses:
    UDADeviceType

      public class DeviceType
      extends Object

  Represents a device type, for example `urn:my-domain-namespace:device:MyDevice:1`.

  Although decimal versions are accepted and parsed, the version used for comparison is only the integer without the fraction.

  Author:
    Christian Bauer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Pattern` | `PATTERN`
    `static String` | `UNKNOWN`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeviceType(String namespace, String type)`
    `DeviceType(String namespace, String type, int version)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getDisplayString()`
    `String` | `getNamespace()`
    `String` | `getType()`
    `int` | `getVersion()`
    `int` | `hashCode()`
    `boolean` | `implementsVersion(DeviceType that)`
    `String` | `toString()`
    `static DeviceType` | `valueOf(String s)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### UNKNOWN

          public static final String UNKNOWN

      See Also:
        Constant Field Values

    - #### PATTERN

          public static final Pattern PATTERN

  - ### Constructor Detail

    - #### DeviceType

          public DeviceType(String namespace,
                    String type)

    - #### DeviceType

          public DeviceType(String namespace,
                    String type,
                    int version)

  - ### Method Detail

    - #### getNamespace

          public String getNamespace()

    - #### getType

          public String getType()

    - #### getVersion

          public int getVersion()

    - #### valueOf

          public static DeviceType valueOf(String s)
                                    throws InvalidValueException

      Returns:
        Either a `UDADeviceType` or a more generic `DeviceType`.
      Throws:
        `InvalidValueException`

    - #### implementsVersion

          public boolean implementsVersion(DeviceType that)

    - #### getDisplayString

          public String getDisplayString()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2014 4th Line GmbH, Switzerland. All Rights Reserved.