@Test public void group_notfound() { final MetricSelector selector = new MetricSelector(notfound_group, MetricName.valueOf("99 Kriegsminister")); TimeSeriesMetricDeltaSet found = selector.apply(ctx); assertTrue(found.isEmpty()); }
@Override public TimeSeriesMetricDeltaSet apply(Context ctx) { return metric_.apply(ctx) .map(p -> MetricName.valueOf(p.getPath())) .map(group_.getTSDelta(ctx)::findMetric) .orElseGet(TimeSeriesMetricDeltaSet::new); }
MetricSelector implements TimeSeriesMetricExpression { @Override public TimeSeriesMetricDeltaSet apply(Context ctx) { return metric_.apply(ctx) .map(p -> MetricName.valueOf(p.getPath())) .map(group_.getTSDelta(ctx)::findMetric) .orElseGet(TimeSeriesMetricDeltaSet::new); } }
MetricSelector implements TimeSeriesMetricExpression { @Override public TimeSeriesMetricDeltaSet apply(Context ctx) { return metric_.apply(ctx) .map(p -> MetricName.valueOf(p.getPath())) .map(group_.getTSDelta(ctx)::findMetric) .orElseGet(TimeSeriesMetricDeltaSet::new); } MetricSelector(GroupExpression group, MetricName metric);  MetricSelector(GroupExpression group, NameResolver metric); }
MetricSelector implements TimeSeriesMetricExpression { @Override public TimeSeriesMetricDeltaSet apply(Context ctx) { return metric_.apply(ctx) .map(p -> MetricName.valueOf(p.getPath())) .map(group_.getTSDelta(ctx)::findMetric) .orElseGet(TimeSeriesMetricDeltaSet::new); } MetricSelector(GroupExpression group, MetricName metric);  MetricSelector(GroupExpression group, NameResolver metric); GroupExpression getGroup(); NameResolver getMetric(); @Override Collection<TimeSeriesMetricExpression> getChildren(); @Override TimeSeriesMetricFilter getNameFilter(); @Override TimeSeriesMetricDeltaSet apply(Context ctx); @Override int getPriority(); @Override StringBuilder configString(); }
MetricSelector implements TimeSeriesMetricExpression { @Override public TimeSeriesMetricDeltaSet apply(Context ctx) { return metric_.apply(ctx) .map(p -> MetricName.valueOf(p.getPath())) .map(group_.getTSDelta(ctx)::findMetric) .orElseGet(TimeSeriesMetricDeltaSet::new); } MetricSelector(GroupExpression group, MetricName metric);  MetricSelector(GroupExpression group, NameResolver metric); GroupExpression getGroup(); NameResolver getMetric(); @Override Collection<TimeSeriesMetricExpression> getChildren(); @Override TimeSeriesMetricFilter getNameFilter(); @Override TimeSeriesMetricDeltaSet apply(Context ctx); @Override int getPriority(); @Override StringBuilder configString();  }