org.fourthline.cling.model.types

## Class CustomDatatype

- java.lang.Object
- - org.fourthline.cling.model.types.AbstractDatatype<String>
  - - org.fourthline.cling.model.types.CustomDatatype

- All Implemented Interfaces:
    Datatype<String>

      public class CustomDatatype
      extends AbstractDatatype<String>

  Author:
    Christian Bauer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.fourthline.cling.model.types.Datatype

      `Datatype.Builtin, Datatype.Default`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CustomDatatype(String name)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getName()`
    `String` | `toString()`
    `String` | `valueOf(String s)` Transforms a string representation into a value of the supported type.

    - ### Methods inherited from class org.fourthline.cling.model.types.AbstractDatatype

      `getBuiltin, getDisplayString, getString, getValueType, isHandlingJavaType, isValid, setBuiltin`

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

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

- - ### Constructor Detail

    - #### CustomDatatype

          public CustomDatatype(String name)

  - ### Method Detail

    - #### getName

          public String getName()

    - #### valueOf

          public String valueOf(String s)
                         throws InvalidValueException

      Description copied from interface: `Datatype`
      Transforms a string representation into a value of the supported type.
      Specified by:
        `valueOf` in interface `Datatype<String>`
      Overrides:
        `valueOf` in class `AbstractDatatype<String>`
      Parameters:
        `s` - The string representation of a value.
      Returns:
        The converted value or `null` if the string was `null` or empty.
      Throws:
        `InvalidValueException` - If the string couldn't be parsed.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `AbstractDatatype<String>`

Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.