void merge(UntypedMetric other, boolean otherIsNewer) throws IllegalArgumentException {
        if (outputFormat == AssumedType.NONE) {
            outputFormat = other.outputFormat;
        }
        if (outputFormat != other.outputFormat) {
            throw new IllegalArgumentException("Mismatching output formats: " + outputFormat + " and " + other.outputFormat + ".");
        }
        if (count > 0) {
            if (other.count > 0) {
                max = Math.max(other.max, max);
                min = Math.min(other.min, min);
                if (otherIsNewer) {
                    current = other.current;
                }
            }
        } else {
            max = other.max;
            min = other.min;
            current = other.current;
        }
        count += other.count;
        sum += other.sum;
        if (histogram != null) {
            // some config scenarios may lead to differing histogram settings,
            // so doing this defensively
            if (other.histogram != null) {
                try {
                    histogram.add(other.histogram);
                } catch (ArrayIndexOutOfBoundsException e) {
                    log.log(Level.WARNING, "Had trouble merging histograms: " + e.getMessage());
                }
            }
        }
    }
A gauge or a counter or... who knows? The class for storing a metric when the
metric has not been declared.

@author Steinar Knutsen
container-core/src/main/java/com/yahoo/metrics/simple/UntypedMetric.java