MCPcopy Create free account
hub / github.com/antlr/codebuff / put

Method put

output/java_guava/1.4.17/ImmutableMap.java:210–217  ·  view source on GitHub ↗

Associates key with value in the built map. Duplicate keys are not allowed, and will cause #build to fail.

(K key, V value)

Source from the content-addressed store, hash-verified

208 */
209
210 @CanIgnoreReturnValue
211 public Builder<K, V> put(K key, V value) {
212 ensureCapacity(size + 1);
213 ImmutableMapEntry<K, V> entry = entryOf(key, value);
214 // don't inline this: we want to fail atomically if key or value is null
215 entries[size++] = entry;
216 return this;
217 }
218
219 /**
220 * Adds the given {@code entry} to the map, making it immutable if

Callers 3

indexMapMethod · 0.95
SparseImmutableTableMethod · 0.95
putAllMethod · 0.95

Calls 4

ensureCapacityMethod · 0.95
getKeyMethod · 0.65
getValueMethod · 0.65
entryOfMethod · 0.45

Tested by

no test coverage detected