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

Method valueAsT

api/src/main/java/io/grpc/Metadata.java:196–203  ·  view source on GitHub ↗
(int i, Key<T> key)

Source from the content-addressed store, hash-verified

194 }
195
196 private <T> T valueAsT(int i, Key<T> key) {
197 Object value = value(i);
198 if (value instanceof byte[]) {
199 return key.parseBytes((byte[]) value);
200 } else {
201 return ((LazyValue<?>) value).toObject(key);
202 }
203 }
204
205 private int cap() {
206 return namesAndValues != null ? namesAndValues.length : 0;

Callers 4

getMethod · 0.95
removeMethod · 0.95
removeAllMethod · 0.95
nextMethod · 0.80

Calls 3

valueMethod · 0.95
toObjectMethod · 0.80
parseBytesMethod · 0.65

Tested by

no test coverage detected