Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gisgraphy.util
Class ConvertUtil

    java.lang.Object
      com.gisgraphy.util.ConvertUtil

    public final class ConvertUtil

extends java.lang.Object

Utility class to convert one object to another.

Method Summary
`static java.util.Map<java.lang.String,java.lang.String>` | `convertBundleToMap(java.util.ResourceBundle rb)` Method to convert a ResourceBundle to a Map object.
`static java.util.Properties` | `convertBundleToProperties(java.util.ResourceBundle rb)` Method to convert a ResourceBundle to a Properties object.
`static java.util.Map<java.lang.String,java.lang.String>` | `convertListToMap(java.util.List<LabelValue> list)` Convert a java.util.List of LabelValue objects to a LinkedHashMap.
`static java.lang.Object` | `populateObject(java.lang.Object obj, java.util.ResourceBundle rb)` Convenience method used by tests to populate an object from a ResourceBundle

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### convertBundleToMap

    public static java.util.Map<java.lang.String,java.lang.String> convertBundleToMap(java.util.ResourceBundle rb)

  Method to convert a ResourceBundle to a Map object.

  Parameters:
    `rb` - a given resource bundle
  Returns:
    Map a populated map

### convertListToMap

    public static java.util.Map<java.lang.String,java.lang.String> convertListToMap(java.util.List<LabelValue> list)

  Convert a java.util.List of LabelValue objects to a LinkedHashMap.

  Parameters:
    `list` - the list to convert
  Returns:
    the populated map with the label as the key

### convertBundleToProperties

    public static java.util.Properties convertBundleToProperties(java.util.ResourceBundle rb)

  Method to convert a ResourceBundle to a Properties object.

  Parameters:
    `rb` - a given resource bundle
  Returns:
    Properties a populated properties object

### populateObject

    public static java.lang.Object populateObject(java.lang.Object obj,
                                                  java.util.ResourceBundle rb)

  Convenience method used by tests to populate an object from a ResourceBundle

  Parameters:
    `obj` - an initialized object
    `rb` - a resource bundle
  Returns:
    a populated object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. All Rights Reserved.