code: public static <V, K> V putGetNew(Map<K, V> map, K key, V newValue) {
          synchronized (map) {
              map.put(key, newValue);
              return newValue;
          }
      }
docs: Put get new v.
  
  @param <V>      the type parameter
  @param <K>      the type parameter
  @param map      the map
  @param key      the key
  @param newValue the new value
  @return the v