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

Method entryIterator

output/java_guava/1.4.18/StandardTable.java:356–397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

backingRowMapMethod · 0.95
iteratorMethod · 0.65
entrySetMethod · 0.65

Tested by

no test coverage detected