tigase.util

## Class DataTypes

- java.lang.Object
- - tigase.util.DataTypes

-     public class DataTypes
      extends Object

  Created: May 28, 2009 7:39:07 AM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Map<String,Character>` | `typesMap` Field description

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataTypes()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static char` | `decodeTypeIdFromName(String name)` Method description
    `static Object` | `decodeValueType(char typeId, String value)` Method description
    `static String` | `encodeTypeIdInName(String name, Object value)` Method description
    `static boolean` | `getProperty(String key, Boolean def)` Method description
    `static char` | `getTypeId(Object instance)` Method description
    `static boolean` | `parseBool(String val)` Method description
    `static <T extends Number> T` | `parseNum(String num, Class<T> cls, T def)` Method description
    `static int` | `parseSizeInt(String size, int def)` Method description
    `static String` | `stripNameFromTypeId(String name)` Method description
    `static String` | `valueToString(Object value)` Method description

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

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

- - ### Field Detail

    - #### typesMap

          public static final Map<String,Character> typesMap

      Field description

  - ### Constructor Detail

    - #### DataTypes

          public DataTypes()

  - ### Method Detail

    - #### parseNum

          public static <T extends Number> T parseNum(String num,
                                      Class<T> cls,
                                      T def)

      Method description
      Type Parameters:
        `T` -
      Parameters:
        `num` -
        `cls` -
        `def` -

    - #### parseSizeInt

          public static int parseSizeInt(String size,
                         int def)

      Method description
      Parameters:
        `size` -
        `def` -

    - #### parseBool

          public static boolean parseBool(String val)

      Method description
      Parameters:
        `val` -

    - #### decodeValueType

          public static Object decodeValueType(char typeId,
                               String value)
                                        throws IllegalArgumentException

      Method description
      Parameters:
        `typeId` -
        `value` -
      Throws:
        `IllegalArgumentException`

    - #### valueToString

          public static String valueToString(Object value)

      Method description
      Parameters:
        `value` -

    - #### decodeTypeIdFromName

          public static char decodeTypeIdFromName(String name)

      Method description
      Parameters:
        `name` -

    - #### stripNameFromTypeId

          public static String stripNameFromTypeId(String name)

      Method description
      Parameters:
        `name` -

    - #### encodeTypeIdInName

          public static String encodeTypeIdInName(String name,
                                  Object value)

      Method description
      Parameters:
        `name` -
        `value` -

    - #### getTypeId

          public static char getTypeId(Object instance)

      Method description
      Parameters:
        `instance` -

    - #### getProperty

          public static boolean getProperty(String key,
                            Boolean def)

      Method description
      Parameters:
        `key` -
        `def` -

Copyright © 2013 Tigase. All rights reserved.