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

Method put

classpath/java/util/LinkedHashMap.java:49–62  ·  view source on GitHub ↗
(K key, V value)

Source from the content-addressed store, hash-verified

47 }
48
49 public V put(K key, V value) {
50 if (!super.containsKey(key)) {
51 LinkedKey<K> k = new LinkedKey<K>(key);
52 if (first == null) {
53 first = k;
54 } else {
55 last.next = k;
56 k.previous = last;
57 }
58 last = k;
59 lookup.put(key, k);
60 }
61 return super.put(key, value);
62 }
63
64 public V remove(Object key) {
65 LinkedKey<K> linked = lookup.get(key);

Callers

nothing calls this directly

Calls 2

containsKeyMethod · 0.65
putMethod · 0.65

Tested by

no test coverage detected