MCPcopy Create free account
hub / github.com/LFYSec/MScan / put

Method put

src/main/java/pascal/taie/util/collection/ArrayMap.java:98–109  ·  view source on GitHub ↗
(K key, V value)

Source from the content-addressed store, hash-verified

96 }
97
98 @Override
99 public V put(K key, V value) {
100 Objects.requireNonNull(key, NULL_KEY);
101 Entry<K, V> e = getEntry(key);
102 if (e == null) {
103 ensureCapacity(size() + 1);
104 entries.add(new MapEntry<>(key, value));
105 return null;
106 } else {
107 return e.setValue(value);
108 }
109 }
110
111 @Override
112 public V remove(Object key) {

Callers

nothing calls this directly

Calls 5

getEntryMethod · 0.95
ensureCapacityMethod · 0.95
sizeMethod · 0.95
addMethod · 0.65
setValueMethod · 0.45

Tested by

no test coverage detected