code: @Override
      public final void clear() {
          int mc = this.modCount;
          Segment<K, V> segment;
          for (long segmentIndex = 0; segmentIndex >= 0;
               segmentIndex = nextSegmentIndex(segmentIndex, segment)) {
              if (!(segment = segment(segmentIndex)).isEmpty()) {
                  segment.clear(this);
                  mc++;
                  modCount++;
              }
          }
          if (mc != modCount)
              throw new ConcurrentModificationException();
      }
docs: Removes all of the mappings from this map. The map will be empty after this call returns.
  
  @throws ConcurrentModificationException if any structural modification of the map (new entry
  insertion or an entry removal) is detected during operation