code: @Override
      public boolean isEmpty() {
          /*
           * Sum per-segment modCounts to avoid mis-reporting when
           * elements are concurrently added and removed in one segment
           * while checking another, in which case the table was never
           * actually empty at any point. (The sum ensures accuracy up
           * through at least 1<<31 per-segment modifications before
           * recheck.)  Methods size() and containsValue() use similar
           * constructions for stability checks.
           */
          long sum = 0L;
          final Segment<K,V>[] segments = this.segments;
          for (int j = 0; j < segments.length; ++j) {
              Segment<K,V> seg = segmentAt(segments, j);
              if (seg != null) {
                  if (seg.count != 0) {
                    return false;
                  }
                  sum += seg.modCount;
              }
          }
          if (sum != 0L) { // recheck unless no modifications
              for (int j = 0; j < segments.length; ++j) {
                  Segment<K,V> seg = segmentAt(segments, j);
                  if (seg != null) {
                      if (seg.count != 0) {
                        return false;
                      }
                      sum -= seg.modCount;
                  }
              }
              if (sum != 0L) {
                return false;
              }
          }
          return true;
      }
docs: Returns <tt>true</tt> if this map contains no key-value mappings.
  
  @return <tt>true</tt> if this map contains no key-value mappings