code: public void forEach(BiConsumer<? super K, ? super V> action) {
          if (action == null)
              throw new NullPointerException();
          int mc = modCount;
          // Android-changed: Detect changes to modCount early.
          for (LinkedHashMapEntry<K,V> e = head; modCount == mc && e != null; e = e.after)
              action.accept(e.key, e.value);
          if (modCount != mc)
              throw new ConcurrentModificationException();
      }
docs: Map overrides