/** Returns {@code true} if this map maps one or more keys to this value. */ @Override public boolean containsValue(final Object value) { ensureNotNull(value); /* * We must rely on the super-class default implementation, not on HashMap * implementation, because some references are wrapped into SoftReferences. */ return super.containsValue(value); }
@Override public V put(final K key, final V value) { ensureNotNull(value); Object oldValue = hash.put((K) replaceNull(key), value); if (oldValue instanceof Reference) {
/** * Returns {@code true} if this map maps one or more keys to this value. */ public boolean containsValue(final Object value) { ensureNotNull(value); synchronized (hash) { /* * We must rely on the super-class default implementation, not on HashMap * implementation, because some references are wrapped into SoftReferences. */ return super.containsValue(value); } }
/** * Returns {@code true} if this map maps one or more keys to this value. */ @Override public boolean containsValue(final Object value) { ensureNotNull(value); synchronized (hash) { /* * We must rely on the super-class default implementation, not on HashMap * implementation, because some references are wrapped into SoftReferences. */ return super.containsValue(value); } }
ensureNotNull(value); synchronized (hash) { Object oldValue = hash.put(key, value);
ensureNotNull(value); synchronized (hash) { Object oldValue = hash.put(key, value);