public static < K , E > void addToList ( Map < K , List < E > > map , K k , E e ) { getList ( map , k ) . add ( e ) ; }
Adds the given element to the list that is stored under the given key . If the list does not yet exist it is created and inserted into the map .