public static < K > void incrementCount ( Map < K , Integer > map , K k ) { map . put ( k , getCount ( map , k ) + 1 ) ; }
Increments the value that is stored for the given key in the given map by one or sets it to 1 if there was no value stored for the given key .