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

Method put

PCGen-base/code/src/java/pcgen/base/util/TripleKeyMap.java:138–147  ·  view source on GitHub ↗

Puts a new object into the TripleKeyMap. This method is reference-semantic and this TripleKeyMap will maintain a strong reference to both the key object and the value object given as arguments to this method. @param key1 The primary key used to store the value in this TripleKeyMap. @par

(K1 key1, K2 key2, K3 key3, V value)

Source from the content-addressed store, hash-verified

136 * stored with the given keys.
137 */
138 public V put(K1 key1, K2 key2, K3 key3, V value)
139 {
140 Map<K3, V> localMap = map.get(key1, key2);
141 if (localMap == null)
142 {
143 localMap = createLocalMap();
144 map.put(key1, key2, localMap);
145 }
146 return localMap.put(key3, value);
147 }
148
149 /**
150 * Gets an object from the TripleKeyMap.

Callers 2

testCloneMethod · 0.95
processAddsMethod · 0.95

Calls 3

createLocalMapMethod · 0.95
getMethod · 0.65
putMethod · 0.65

Tested by 1

testCloneMethod · 0.76