Class ConfigUtil


  • public class ConfigUtil
    extends Object
    Static convenience methods for working with Configuration instances.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Set<String> childKeys​(org.apache.commons.configuration.Configuration config)
      Get the list of child keys for a configuration node.
      static Set<String> childKeys​(org.apache.commons.configuration.Configuration config, String parent)
      Get the list of child keys for a configuration node.
      static Map<String,​org.apache.commons.configuration.Configuration> childMap​(org.apache.commons.configuration.Configuration config)
      Get a map of configuration nodes mapped to the names of the children of the root configuration node.
      static Map<String,​org.apache.commons.configuration.Configuration> childMap​(org.apache.commons.configuration.Configuration config, String parent)
      Get a map of configuration nodes mapped to the names of the children of the parent parameter.
    • Method Detail

      • childMap

        public static Map<String,​org.apache.commons.configuration.Configuration> childMap​(org.apache.commons.configuration.Configuration config,
                                                                                                String parent)
        Get a map of configuration nodes mapped to the names of the children of the parent parameter.
        Parameters:
        config - Configuration object, may be a subset of the configuration tree.
        parent - Path to the parent node.
        Returns:
        A map of all the children for the parent configuration node passed.
      • childMap

        public static Map<String,​org.apache.commons.configuration.Configuration> childMap​(org.apache.commons.configuration.Configuration config)
        Get a map of configuration nodes mapped to the names of the children of the root configuration node.
        Parameters:
        config - Configuration object, may be a subset of the configuration tree.
        Returns:
        A map of all the children for the parent configuration node passed.
      • childKeys

        public static Set<String> childKeys​(org.apache.commons.configuration.Configuration config,
                                            String parent)
        Get the list of child keys for a configuration node.
        Parameters:
        config - Configuration object, may be a subset of the configuration tree.
        parent - Path to the parent node.
        Returns:
        A string array containing the names of the children.
      • childKeys

        public static Set<String> childKeys​(org.apache.commons.configuration.Configuration config)
        Get the list of child keys for a configuration node.
        Parameters:
        config - Configuration object, may be a subset of the configuration tree.
        Returns:
        A string array containing the names of the children.