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

Method iterator

api/src/main/java/io/grpc/Metadata.java:266–300  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

264 }
265
266 @Override
267 public Iterator<T> iterator() {
268 return new Iterator<T>() {
269 private boolean hasNext = true;
270 private int idx = startIdx;
271
272 @Override
273 public boolean hasNext() {
274 if (hasNext) {
275 return true;
276 }
277 for (; idx < size; idx++) {
278 if (bytesEqual(key.asciiName(), name(idx))) {
279 hasNext = true;
280 return hasNext;
281 }
282 }
283 return false;
284 }
285
286 @Override
287 public T next() {
288 if (hasNext()) {
289 hasNext = false;
290 return valueAsT(idx++, key);
291 }
292 throw new NoSuchElementException();
293 }
294
295 @Override
296 public void remove() {
297 throw new UnsupportedOperationException();
298 }
299 };
300 }
301 }
302
303 /**

Callers 15

checkForUpdatesMethod · 0.45
createMethod · 0.45
invalidateAllMethod · 0.45
fitToLimitMethod · 0.45
cleanupExpiredEntriesMethod · 0.45
testTaskFilterMethod · 0.45
FakeMessageProducerMethod · 0.45
verifyWriteMethod · 0.45
verifyWriteWithTagsMethod · 0.45

Calls

no outgoing calls