MCPcopy Create free account
hub / github.com/PCGen/pcgen / put

Method put

PCGen-base/code/src/java/pcgen/base/util/DoubleKeyMap.java:182–185  ·  view source on GitHub ↗

Put the given value into this DoubleKeyMap for the given keys. If this DoubleKeyMap already contained a mapping for the given keys, the previous value is returned. Otherwise, null is returned. @param key1 The primary key for storing the given value @param key2 The secondary ke

(K1 key1, K2 key2, V value)

Source from the content-addressed store, hash-verified

180 * given keys did not previously have a mapping
181 */
182 public V put(K1 key1, K2 key2, V value)
183 {
184 return map.computeIfAbsent(key1, k -> createLocalMap()).put(key2, value);
185 }
186
187 /**
188 * Copies the key/value combinations from the given DoubleKeyMap into this

Callers 6

testClearIsEmptyMethod · 0.95
testCloneMethod · 0.95
parseNonEmptyTokenMethod · 0.95

Calls 3

createLocalMapMethod · 0.95
putMethod · 0.65
computeIfAbsentMethod · 0.45

Tested by 5

testClearIsEmptyMethod · 0.76
testCloneMethod · 0.76