Package com.enonic.xp.data

## Class ValueType<T>

- java.lang.Object
- - com.enonic.xp.data.ValueType<T>

-     @PublicApi
      public abstract class ValueType<T>
      extends Object

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `ValueType​(String name, com.enonic.xp.data.JavaTypeConverter<T> converter)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `T` | `convert​(Object object)` |
    `boolean` | `equals​(Object o)` |
    `abstract Value` | `fromJsonValue​(Object object)` | Returns a new Value of this ValueType from object used in JSON.
    `Class<T>` | `getJavaType()` |
    `String` | `getName()` |
    `int` | `hashCode()` |
    `String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### ValueType

          protected ValueType​(String name,
                              com.enonic.xp.data.JavaTypeConverter<T> converter)

  - ### Method Detail

    - #### getName

          public final String getName()

    - #### getJavaType

          public final Class<T> getJavaType()

    - #### equals

          public final boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public final String toString()

      Overrides:
        `toString` in class `Object`

    - #### convert

          public final T convert​(Object object)

    - #### fromJsonValue

          public abstract Value fromJsonValue​(Object object)

      Returns a new Value of this ValueType from object used in JSON. See `Value.toJsonValue()`