tigase.util.repository

## Class DataTypes

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

-     public class DataTypes
      extends Object

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

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataTypes()`

  - ### Method Summary

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

    - ### 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

  - ### Constructor Detail

    - #### DataTypes

          public DataTypes()

  - ### Method Detail

    - #### decodeTypeIdFromName

          public static char decodeTypeIdFromName(String name)

    - #### decodeValueType

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

      Throws:
        `IllegalArgumentException`

    - #### encodeTypeIdInName

          public static String encodeTypeIdInName(String name,
                                                  Object value)

    - #### getProperty

          public static boolean getProperty(String key,
                                            Boolean def)

    - #### getTypeId

          public static char getTypeId(Object instance)

    - #### main

          public static void main(String[] args)

    - #### parseBool

          public static boolean parseBool(String val)

    - #### parseNum

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

    - #### parseSizeInt

          public static int parseSizeInt(String size,
                                         int def)

    - #### stripNameFromTypeId

          public static String stripNameFromTypeId(String name)

    - #### valueToString

          public static String valueToString(Object value)

Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.