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

Method entryIterator

output/java_guava/1.4.19/StandardTable.java:358–399  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

356 }
357
358 @Override
359 Iterator<Entry<C, V>> entryIterator() {
360 final Map<C, V> map = backingRowMap();
361 if (map == null) {
362 return Iterators.emptyModifiableIterator();
363 }
364 final Iterator<Entry<C, V>> iterator = map.entrySet().iterator();
365 return new Iterator<Entry<C, V>>() {
366 @Override
367 public boolean hasNext() {
368 return iterator.hasNext();
369 }
370
371 @Override
372 public Entry<C, V> next() {
373 final Entry<C, V> entry = iterator.next();
374 return new ForwardingMapEntry<C, V>() {
375 @Override
376 protected Entry<C, V> delegate() {
377 return entry;
378 }
379
380 @Override
381 public V setValue(V value) {
382 return super.setValue(checkNotNull(value));
383 }
384
385 @Override
386 public boolean equals(Object object) {
387 // TODO(lowasser): identify why this affects GWT tests
388 return standardEquals(object);
389 }
390 };
391 }
392
393 @Override
394 public void remove() {
395 iterator.remove();
396 maintainEmptyInvariant();
397 }
398 };
399 }
400 }
401
402 /**

Callers

nothing calls this directly

Calls 4

backingRowMapMethod · 0.95
iteratorMethod · 0.65
entrySetMethod · 0.65

Tested by

no test coverage detected