public static < K , V > Map < K , V > transform ( Map < K , V > map , Transformer < V > transformer ) { Assert . notNull ( map , "Map is required" ) ; Assert . notNull ( transformer , "Transformer is required" ) ; return map . entrySet ( ) . stream ( ) . collect ( Collectors . toMap ( Map . Entry :: < K > getKey , ( entry ) - > transformer . transform ( entry . getValue ( ) ) ) ) ; }
Transforms the values of the given Map with the specified Transformer .