public Configuration prefixedWith ( String ... prefixes ) { if ( prefixes == null || prefixes . length == 0 ) { return this ; } Map < String , String > filteredConfig = implementationConfiguration . entrySet ( ) . stream ( ) . filter ( e -> Arrays . stream ( prefixes ) . anyMatch ( p -> e . getKey ( ) . startsWith ( p ) ) ) . collect ( toMap ( Map . Entry :: getKey , Map . Entry :: getValue ) ) ; return new Configuration ( feedIdStrategy , resultFilter , filteredConfig ) ; }
Filters out all the configuration entries whose keys don t start with any of the white - listed prefixes