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

Method put

output/java_guava/1.4.19/ImmutableMap.java:211–218  ·  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

209 */
210
211 @CanIgnoreReturnValue
212 public Builder<K, V> put(K key, V value) {
213 ensureCapacity(size + 1);
214 ImmutableMapEntry<K, V> entry = entryOf(key, value);
215 // don't inline this: we want to fail atomically if key or value is null
216 entries[size++] = entry;
217 return this;
218 }
219
220 /**
221 * 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