MCPcopy Create free account
hub / github.com/grpc/grpc-java / expand

Method expand

api/src/main/java/io/grpc/Metadata.java:362–368  ·  view source on GitHub ↗
(int newCapacity)

Source from the content-addressed store, hash-verified

360
361 // Expands to exactly the desired capacity.
362 private void expand(int newCapacity) {
363 Object[] newNamesAndValues = new Object[newCapacity];
364 if (!isEmpty()) {
365 System.arraycopy(namesAndValues, 0, newNamesAndValues, 0, len());
366 }
367 namesAndValues = newNamesAndValues;
368 }
369
370 /**
371 * Removes the first occurrence of {@code value} for {@code key}.

Callers 3

valueMethod · 0.95
maybeExpandMethod · 0.95
mergeMethod · 0.95

Calls 2

isEmptyMethod · 0.95
lenMethod · 0.95

Tested by

no test coverage detected