public static Map<String, Properties> partitionOnCommonPrefixes(final Properties properties) {
        final Map<String, Properties> parts = new ConcurrentHashMap<>();
        for (final String key : properties.stringPropertyNames()) {
            final String prefix = key.substring(0, key.indexOf('.'));
            if (!parts.containsKey(prefix)) {
                parts.put(prefix, new Properties());
            }
            parts.get(prefix).setProperty(key.substring(key.indexOf('.') + 1), properties.getProperty(key));
        }
        return parts;
    }
public static Map < String , Properties > partitionOnCommonPrefixes ( final Properties properties ) { final Map < String , Properties > parts = new ConcurrentHashMap < > ( ) ; for ( final String key : properties . stringPropertyNames ( ) ) { final String prefix = key . substring ( 0 , key . indexOf ( '.' ) ) ; if ( ! parts . containsKey ( prefix ) ) { parts . put ( prefix , new Properties ( ) ) ; } parts . get ( prefix ) . setProperty ( key . substring ( key . indexOf ( '.' ) + 1 ) , properties . getProperty ( key ) ) ; } return parts ; }
Partitions a properties map based on common key prefixes up to the first period.

@param properties properties to partition
@return the partitioned properties where each key is the common prefix (minus the period) and the values are
new property maps without the prefix and period in the key
@since 2.6