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

Method discard

api/src/main/java/io/grpc/Attributes.java:249–258  ·  view source on GitHub ↗

Removes the key and associated value from the attributes. @since 1.22.0 @param key The key to remove @return this

(Key<T> key)

Source from the content-addressed store, hash-verified

247 * @return this
248 */
249 public <T> Builder discard(Key<T> key) {
250 if (base != null) {
251 if (base.data.containsKey(key)) {
252 data(0).remove(key);
253 }
254 } else {
255 newdata.remove(key);
256 }
257 return this;
258 }
259
260 public Builder setAll(Attributes other) {
261 data(other.data.size()).putAll(other.data);

Callers 6

onResult2Method · 0.80
discard_noBaseMethod · 0.80
discard_emptyMethod · 0.80

Calls 3

dataMethod · 0.95
containsKeyMethod · 0.80
removeMethod · 0.65

Tested by 4

discard_noBaseMethod · 0.64
discard_emptyMethod · 0.64