class WeakConcurrentMap extends ReferenceQueue<K> {

  @Nullable public V putIfProbablyAbsent(K key, V value) {
    if (key == null) throw new NullPointerException("key == null");
    if (value == null) throw new NullPointerException("value == null");
    expungeStaleEntries();

    return target.putIfAbsent(new WeakKey<>(key, this), value);
  }

}