MCPcopy Create free account
hub / github.com/ReadyTalk/avian / put

Method put

classpath/java/util/HashMap.java:190–200  ·  view source on GitHub ↗
(K key, V value)

Source from the content-addressed store, hash-verified

188 }
189
190 public V put(K key, V value) {
191 Cell<K, V> c = find(key);
192 if (c == null) {
193 insert(helper.make(key, value, null));
194 return null;
195 } else {
196 V old = c.getValue();
197 c.setValue(value);
198 return old;
199 }
200 }
201
202 public void putAll(Map<? extends K,? extends V> elts) {
203 for (Map.Entry<? extends K, ? extends V> entry : elts.entrySet()) {

Callers 5

testHashMapMethod · 0.95
readMethod · 0.95
collectTypeVariablesMethod · 0.95
HashMapMethod · 0.95
putAllMethod · 0.95

Calls 5

findMethod · 0.95
insertMethod · 0.95
makeMethod · 0.65
getValueMethod · 0.65
setValueMethod · 0.65

Tested by 2

testHashMapMethod · 0.76
readMethod · 0.76