private Object readResolve() throws ObjectStreamException {
        if (this.equals(HistogramType.FREQUENCY)) {
            return HistogramType.FREQUENCY;
        }
        else if (this.equals(HistogramType.RELATIVE_FREQUENCY)) {
            return HistogramType.RELATIVE_FREQUENCY;
        }
        else if (this.equals(HistogramType.SCALE_AREA_TO_1)) {
            return HistogramType.SCALE_AREA_TO_1;
        }
        return null;