code: @Override
      public final void forEach(BiConsumer<? super K, ? super V> action) {
          Objects.requireNonNull(action);
          int mc = this.modCount;
          Segment<K, V> segment;
          for (long segmentIndex = 0; segmentIndex >= 0;
               segmentIndex = nextSegmentIndex(segmentIndex, segment)) {
              (segment = segment(segmentIndex)).forEach(action);
          }
          if (mc != modCount)
              throw new ConcurrentModificationException();
      }
docs: Performs the given action for each entry in this map until all entries have been processed or
  the action throws an exception. Actions are performed in the order of {@linkplain #entrySet()
  entry set} iteration. Exceptions thrown by the action are relayed to the caller.
  
  @param action The action to be performed for each entry
  @throws NullPointerException if the specified action is null
  @throws ConcurrentModificationException if any structural modification of the map (new entry
  insertion or an entry removal) is detected during iteration
  @see #forEachWhile(BiPredicate)