public <T extends Average> T merge(T other) { if(other.count() == 0) return (T)this; super.merge(other); if(other instanceof AverageMinMax) { AverageMinMax o=(AverageMinMax)other; this.min=Math.min(min, o.min()); this.max=Math.max(max, o.max()); if(this.values != null) this.values.addAll(o.values); } return (T)this; }
public <T extends Average> T merge(T other) { if(other.count() == 0) return (T)this; super.merge(other); if(other instanceof AverageMinMax) { AverageMinMax o=(AverageMinMax)other; this.min=Math.min(min, o.min()); this.max=Math.max(max, o.max()); if(this.values != null) this.values.addAll(o.values); } return (T)this; }