@Test public void testSetChildReturnsGauge() { Gauge g = metric.setChild(new Gauge.Child(){ public double get() { return 42; } }, "a"); }
public <T extends Collector> T setChild(Child child, String... labelValues) { if (labelValues.length != labelNames.size()) { throw new IllegalArgumentException("Incorrect number of labels."); } children.put(Arrays.asList(labelValues), child); return (T)this; }
SimpleCollector extends Collector { public <T extends Collector> T setChild(Child child, String... labelValues) { if (labelValues.length != labelNames.size()) { throw new IllegalArgumentException("Incorrect number of labels."); } children.put(Arrays.asList(labelValues), child); return (T)this; } }
SimpleCollector extends Collector { public <T extends Collector> T setChild(Child child, String... labelValues) { if (labelValues.length != labelNames.size()) { throw new IllegalArgumentException("Incorrect number of labels."); } children.put(Arrays.asList(labelValues), child); return (T)this; } protected  SimpleCollector(Builder b); }
SimpleCollector extends Collector { public <T extends Collector> T setChild(Child child, String... labelValues) { if (labelValues.length != labelNames.size()) { throw new IllegalArgumentException("Incorrect number of labels."); } children.put(Arrays.asList(labelValues), child); return (T)this; } protected  SimpleCollector(Builder b); Child labels(String... labelValues); void remove(String... labelValues); void clear(); T setChild(Child child, String... labelValues); }
SimpleCollector extends Collector { public <T extends Collector> T setChild(Child child, String... labelValues) { if (labelValues.length != labelNames.size()) { throw new IllegalArgumentException("Incorrect number of labels."); } children.put(Arrays.asList(labelValues), child); return (T)this; } protected  SimpleCollector(Builder b); Child labels(String... labelValues); void remove(String... labelValues); void clear(); T setChild(Child child, String... labelValues);  }