Package org.apache.commons.configuration2

# Class ConfigurationConverter

java.lang.Object
org.apache.commons.configuration2.ConfigurationConverter

public final class ConfigurationConverter extends Object
Configuration converter. Helper class to convert between Configuration, ExtendedProperties and standard Properties.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Configuration`
  `getConfiguration(Properties props)`
  Convert a standard Properties class into a configuration class.
  `static Map<Object,Object>`
  `getMap(Configuration config)`
  Convert a Configuration class into a Map class.
  `static Properties`
  `getProperties(Configuration config)`
  Convert a Configuration class into a Properties class.
  `static Properties`
  `getProperties(ImmutableConfiguration config)`
  Convert a Configuration class into a Properties class.

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

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

- ## Method Details

  - ### getConfiguration

    public static Configuration getConfiguration(Properties props)
    Convert a standard Properties class into a configuration class.
    Parameters:
      `props` - properties object to convert
    Returns:
      Configuration configuration created from the Properties

  - ### getMap

    public static Map<Object,Object> getMap(Configuration config)
    Convert a Configuration class into a Map class.
    Parameters:
      `config` - Configuration object to convert
    Returns:
      Map created from the Configuration

  - ### getProperties

    public static Properties getProperties(Configuration config)
    Convert a Configuration class into a Properties class. List properties are joined into a string using either the list delimiter handler of the configuration (if it extends AbstractConfiguration) or with a comma as delimiter otherwise. This version of the method exists only for backwards compatibility reason.
    Parameters:
      `config` - Configuration object to convert
    Returns:
      Properties created from the Configuration

  - ### getProperties

    public static Properties getProperties(ImmutableConfiguration config)
    Convert a Configuration class into a Properties class. List properties are joined into a string using either the list delimiter handler of the configuration (if it extends AbstractConfiguration) or with a comma as delimiter otherwise.
    Parameters:
      `config` - ImmutableConfiguration object to convert
    Returns:
      Properties created from the Configuration
    Since:
      2.2