docs: public void add(final AbstractHistogram otherHistogram) throws ArrayIndexOutOfBoundsException {
          long highestRecordableValue = highestEquivalentValue(valueFromIndex(countsArrayLength - 1));
          if (highestRecordableValue < otherHistogram.getMaxValue()) {
              if (!isAutoResize()) {
                  throw new ArrayIndexOutOfBoundsException(
                          "The other histogram includes values that do not fit in this histogram's range.");
              }
              resize(otherHistogram.getMaxValue());
          }
          if ((bucketCount == otherHistogram.bucketCount) &&
                  (subBucketCount == otherHistogram.subBucketCount) &&
                  (unitMagnitude == otherHistogram.unitMagnitude) &&
                  (getNormalizingIndexOffset() == otherHistogram.getNormalizingIndexOffset())) {
              // Counts arrays are of the same length and meaning, so we can just iterate and add directly:
              long observedOtherTotalCount = 0;
              for (int i = 0; i < otherHistogram.countsArrayLength; i++) {
                  long otherCount = otherHistogram.getCountAtIndex(i);
                  if (otherCount > 0) {
                      addToCountAtIndex(i, otherCount);
                      observedOtherTotalCount += otherCount;
                  }
              }
              setTotalCount(getTotalCount() + observedOtherTotalCount);
              updatedMaxValue(Math.max(getMaxValue(), otherHistogram.getMaxValue()));
              updateMinNonZeroValue(Math.min(getMinNonZeroValue(), otherHistogram.getMinNonZeroValue()));
          } else {
              // Arrays are not a direct match, so we can't just stream through and add them.
              // Instead, go through the array and add each non-zero value found at it's proper value:
              for (int i = 0; i < otherHistogram.countsArrayLength; i++) {
                  long otherCount = otherHistogram.getCountAtIndex(i);
                  if (otherCount > 0) {
                      recordValueWithCount(otherHistogram.valueFromIndex(i), otherCount);
                  }
              }
          }
          setStartTimeStamp(Math.min(startTimeStampMsec, otherHistogram.startTimeStampMsec));
          setEndTimeStamp(Math.max(endTimeStampMsec, otherHistogram.endTimeStampMsec));
      }