public static < T > Map < String , T > toLowerCaseKeys ( Map < String , T > map ) { Map < String , T > res = new HashMap <> ( ) ; for ( Map . Entry < String , T > entry : map . entrySet ( ) ) { res . put ( entry . getKey ( ) . toLowerCase ( ) , entry . getValue ( ) ) ; } return res ; }
Returns a copy of the given map with lowercase keys