public < K , V > Map < K , V > getMap ( String prefix , Function < String , K > keyFactory , Function < String , V > valueFactory ) { Map < K , V > map = new HashMap <> ( ) ; for ( String property : properties . stringPropertyNames ( ) ) { if ( property . startsWith ( prefix + "." ) ) { map . put ( keyFactory . apply ( property . substring ( prefix . length ( ) + 1 ) ) , valueFactory . apply ( properties . getProperty ( property ) ) ) ; } } return map ; }
Returns a map of properties for a given prefix .