Returns a copy of the key/values in the map at the point of calling. However, setValue still sets the value in the
actual SoftHashMap.
196228
@Override
  public Set<Entry<K, V>> entrySet() {
    expungeStaleEntries();
    Set<Entry<K, V>> result = new LinkedHashSet<>();
    for (final Entry<K, SoftReference<V>> entry : hash.entrySet()) {
      final V value = entry.getValue().get();
      if (value != null) {
        result.add(new Entry<K, V>() {
          @Override
          public K getKey() {
            return entry.getKey();
          }

          @Override
          public V getValue() {
            return value;
          }

          @Override
          public V setValue(V v) {
            entry.setValue(new SoftReference<>(v, queue));
            return value;
          }
        });
      }
    }
    return result;
  }
1146171
@Override
    public KVStore putValues(Map<String, Object> kvMap) {
        for (String key : kvMap.keySet()) {
            put(key, ValueObject.of(kvMap.get(key)));
        }
        return this;
    }
1241734
@Override
  public <VALUEBASE, VALUE extends VALUEBASE, KEY extends Key<CoreMap, VALUEBASE>>
    VALUE set(Class<KEY> key, VALUE value) {
    
    if (immutableKeys.contains(key)) {
      throw new HashableCoreMapException("Attempt to change value " +
      		"of immutable field "+key.getSimpleName());
    }
    
    return super.set(key, value);
  }
237386
function setValue(descriptor,key,set,update)
        {
          var _descriptor = descriptor,
              _key = key,
              _set = set,
              _update = update,
              _oldValue;
          return function valueSet(v)
          {
            _oldValue = _descriptor.value;
            if(_set(this,_key,v,_oldValue,arguments,this._stopChange))
            {
              _descriptor.value = v;
            }
            if(!this._stopChange)
            {
              _update(this,_key,v,_oldValue,arguments);
            }
            this._stopChange = undefined;
          }
        }
1274222
def set_as_object(self, value):
        
        self.clear()
        map = MapConverter.to_map(value)
        self.append(map)
937692
protected final Map<K, V> copyMap(Map<K, Expirable<V>> map) {
    ClassLoader classLoader = cacheManager.getClassLoader();
    return map.entrySet().stream().collect(toMap(
        entry -> copier.copy(entry.getKey(), classLoader),
        entry -> copier.copy(entry.getValue().get(), classLoader)));
  }
1289716
public static <K, V> Map<K, V> copy(final Map<K, V> map) {
		if (map == null) {
			return null;
		}

		TypeEnum keyType = null;
		TypeEnum valueType = null;

		Map<K, V> copy = new HashMap<K, V>();
		for (Map.Entry<K, V> entry : map.entrySet()) {
			K key = entry.getKey();
			V value = entry.getValue();

			K keyCopy = null;
			if (key != null) {
				if (keyType == null) {
					keyType = TypeEnum.dataTypeOf(key.getClass());
				}
				keyCopy = copy(key, keyType);
			}

			V valueCopy = null;
			if (value != null) {
				if (valueType == null) {
					valueType = TypeEnum.dataTypeOf(value.getClass());
				}
				valueCopy = copy(value, valueType);
			}

			copy.put(keyCopy, valueCopy);
		}

		return copy;
	}
1200884
public static <T> T getValue(Map<String, Object> map, String key, Class<T> clazz) {
        return map != null ? ValueUtils.convertValue(map.get(key), clazz) : null;
    }
207617
@Override
    public Map<String, Object> getValuesMap() throws AtlasException {
        Map<String, Object> m = new HashMap<>();
        for (String attr : fieldMapping.fields.keySet()) {
//            int pos = fieldMapping.fieldNullPos.get(attr);
//            if (  explicitSets[pos] ) {
                m.put(attr, get(attr));
//            }
        }
        return m;
    }
407704
def set(self, key, value):
        
        value_encoded = encode(value, self.get_change_trigger(key))

        if key in self.data and self.data[key] == value_encoded:
            return self

        self.data[key] = value_encoded
        return self.trigger_changed(key)
793935
@SuppressWarnings({ "unchecked", "checkstyle:illegaltype" })
	Collection<V> copyValues(Collection<V> values) {
		final Object backEnd = DataViewDelegate.undelegate(values);
		if (backEnd instanceof List<?>) {
			return Lists.newArrayList(values);
		}
		if (backEnd instanceof TreeSet<?>) {
			TreeSet<V> c = (TreeSet<V>) backEnd;
			c = Sets.newTreeSet(c.comparator());
			c.addAll(values);
			return c;
		}
		if (backEnd instanceof LinkedHashSet<?>) {
			return Sets.newLinkedHashSet(values);
		}
		if (backEnd instanceof Set<?>) {
			return Sets.newHashSet(values);
		}
		throw new IllegalStateException("Unsupported type of the backend multimap: " + values.getClass()); //$NON-NLS-1$
	}
1080551
@SuppressWarnings("unchecked")
    public V put(final int key, final V value)
    {
        final V val = (V)mapNullValue(value);
        requireNonNull(val, "value cannot be null");

        V oldValue = null;
        @DoNotSub final int mask = values.length - 1;
        @DoNotSub int index = Hashing.hash(key, mask);

        while (null != values[index])
        {
            if (key == keys[index])
            {
                oldValue = (V)values[index];
                break;
            }

            index = ++index & mask;
        }

        if (null == oldValue)
        {
            ++size;
            keys[index] = key;
        }

        values[index] = val;

        if (size > resizeThreshold)
        {
            increaseCapacity();
        }

        return unmapNullValue(oldValue);
    }
222145
private static <K, V> void set(Map<K, Set<V>> map, K key, V value) {
    Set<V> values = map.get(key);
    if (values == null) {
      values = new HashSet<>();
      map.put(key, values);
    }
    values.add(value);
  }
1326042
public V get (K key)
    {
        V value = null;
        SoftReference<V> ref = _map.get(key);
        if (ref != null) {
            value = ref.get();
            if (value == null) {
                _map.remove(key);
            }
        }
        return value;
    }
1329188
public void put(K key, V value)
    {
        this.lock.writeLock().lock();

        try {
            this.map.put(key, new SoftReference<>(value));
        } finally {
            this.lock.writeLock().unlock();
        }
    }
286861
public void copyValuesFromTo(Map<String, Object> otherMap, Map<String, Object> map) {
        getMapHelper().copyValuesFromTo(otherMap, map);
    }
1296467
public V put( final K key, final V value ) {
        synchronized ( _map ) {
            final ManagedItem<V> previous = _map.put( key, new ManagedItem<V>( value, System.currentTimeMillis() ) );
            while ( _map.size() > _size ) {
                _map.remove( _map.keySet().iterator().next() );
            }
            return previous != null
                ? previous._value
                : null;
        }
    }