private Map < String , String > subPropertyMap ( String configPrefix , Map propertiesMap ) { Map < String , String > config = new HashMap < String , String > ( ) ; for ( Object o : propertiesMap . keySet ( ) ) { String key = ( String ) o ; if ( key . startsWith ( configPrefix ) ) { String conf = key . substring ( configPrefix . length ( ) ) ; config . put ( conf , propertiesMap . get ( key ) . toString ( ) ) ; } } return config ; }
Extract a map of the property values starting with the given prefix