@Test public void mean() { assertEquals(5, compositeMetric.mean(), 0); }
@Override public double mean() { return clusterMetrics.stream().map(metric -> metric.mean() * metric.count()) .reduce(Double::sum) .orElse((double) 0) / count(); }
CompositeMetric implements ClusterMetric { @Override public double mean() { return clusterMetrics.stream().map(metric -> metric.mean() * metric.count()) .reduce(Double::sum) .orElse((double) 0) / count(); } }
CompositeMetric implements ClusterMetric { @Override public double mean() { return clusterMetrics.stream().map(metric -> metric.mean() * metric.count()) .reduce(Double::sum) .orElse((double) 0) / count(); } CompositeMetric(ClusterMetric ... clusterMetric);  CompositeMetric(ClusterMetric clusterMetric, Iterable<ClusterMetric> clusterMetrics);  CompositeMetric(Iterable<ClusterMetric> clusterMetrics); }
CompositeMetric implements ClusterMetric { @Override public double mean() { return clusterMetrics.stream().map(metric -> metric.mean() * metric.count()) .reduce(Double::sum) .orElse((double) 0) / count(); } CompositeMetric(ClusterMetric ... clusterMetric);  CompositeMetric(ClusterMetric clusterMetric, Iterable<ClusterMetric> clusterMetrics);  CompositeMetric(Iterable<ClusterMetric> clusterMetrics); @Override double value(); @Override long count(); @Override double min(); @Override double max(); @Override double mean(); @Override String toString(); }
CompositeMetric implements ClusterMetric { @Override public double mean() { return clusterMetrics.stream().map(metric -> metric.mean() * metric.count()) .reduce(Double::sum) .orElse((double) 0) / count(); } CompositeMetric(ClusterMetric ... clusterMetric);  CompositeMetric(ClusterMetric clusterMetric, Iterable<ClusterMetric> clusterMetrics);  CompositeMetric(Iterable<ClusterMetric> clusterMetrics); @Override double value(); @Override long count(); @Override double min(); @Override double max(); @Override double mean(); @Override String toString();  }