@Test public void testAddDataNotEnded() { TestScope scope = new TestScope(); scope.addData("foo", 1.0, StandardUnit.COUNT); }
@Override public void addData(String name, double value, StandardUnit unit) { if (ended) { throw new IllegalArgumentException("Cannot call addData after calling IMetricsScope.end()"); } }
EndingMetricsScope extends DimensionTrackingMetricsScope { @Override public void addData(String name, double value, StandardUnit unit) { if (ended) { throw new IllegalArgumentException("Cannot call addData after calling IMetricsScope.end()"); } } }
EndingMetricsScope extends DimensionTrackingMetricsScope { @Override public void addData(String name, double value, StandardUnit unit) { if (ended) { throw new IllegalArgumentException("Cannot call addData after calling IMetricsScope.end()"); } }  }
EndingMetricsScope extends DimensionTrackingMetricsScope { @Override public void addData(String name, double value, StandardUnit unit) { if (ended) { throw new IllegalArgumentException("Cannot call addData after calling IMetricsScope.end()"); } }  @Override void addData(String name, double value, StandardUnit unit); @Override void addData(String name, double value, StandardUnit unit, MetricsLevel level); @Override void addDimension(String name, String value); @Override void end(); }
EndingMetricsScope extends DimensionTrackingMetricsScope { @Override public void addData(String name, double value, StandardUnit unit) { if (ended) { throw new IllegalArgumentException("Cannot call addData after calling IMetricsScope.end()"); } }  @Override void addData(String name, double value, StandardUnit unit); @Override void addData(String name, double value, StandardUnit unit, MetricsLevel level); @Override void addDimension(String name, String value); @Override void end();  }