public static < Key , Value > Value putIfAbsent ( final ObjectMap < Key , Value > map , final Key key , final Value value ) { if ( ! map . containsKey ( key ) ) { map . put ( key , value ) ; return value ; } return map . get ( key ) ; }
Puts a value with the given key in the passed map provided that the passed key isn t already present in the map .