code: public boolean hasOverflowed() {
          // On overflow, the totalCount accumulated counter will (always) not match the total of counts
          long totalCounted = 0;
          for (int i = 0; i < countsArrayLength; i++) {
              totalCounted += getCountAtIndex(i);
          }
          return (totalCounted != getTotalCount());
      }
docs: Determine if this histogram had any of it's value counts overflow.
  Since counts are kept in fixed integer form with potentially limited range (e.g. int and short), a
  specific value range count could potentially overflow, leading to an inaccurate and misleading histogram
  representation. This method accurately determines whether or not an overflow condition has happened in an
  IntHistogram or ShortHistogram.
  
  @return True if this histogram has had a count value overflow.