@Test(expected = IllegalStateException.class) public void fail_with_duplicate_keys() { Map<Tags, MetricValue> key = singletonMap( Tags.valueOf(singletonMap("foo", MetricValue.fromStrValue("bar"))), MetricValue.fromStrValue("baz")); new TimeSeriesMetricDeltaSet(Stream.of(key, key).map(Map::entrySet).flatMap(Collection::stream)); }
public TimeSeriesMetricDeltaSet map(Function<? super MetricValue, ? extends MetricValue> fn) { return values_ .map( fn, (x) -> x.entrySet().stream().map((entry) -> apply_fn_(entry, fn)) ) .mapCombine(TimeSeriesMetricDeltaSet::new, TimeSeriesMetricDeltaSet::new); }
TimeSeriesMetricDeltaSet { public TimeSeriesMetricDeltaSet map(Function<? super MetricValue, ? extends MetricValue> fn) { return values_ .map( fn, (x) -> x.entrySet().stream().map((entry) -> apply_fn_(entry, fn)) ) .mapCombine(TimeSeriesMetricDeltaSet::new, TimeSeriesMetricDeltaSet::new); } }
TimeSeriesMetricDeltaSet { public TimeSeriesMetricDeltaSet map(Function<? super MetricValue, ? extends MetricValue> fn) { return values_ .map( fn, (x) -> x.entrySet().stream().map((entry) -> apply_fn_(entry, fn)) ) .mapCombine(TimeSeriesMetricDeltaSet::new, TimeSeriesMetricDeltaSet::new); } TimeSeriesMetricDeltaSet(MetricValue td);  TimeSeriesMetricDeltaSet();  TimeSeriesMetricDeltaSet(Map<Tags, MetricValue> td);  TimeSeriesMetricDeltaSet(Stream<Entry<Tags, MetricValue>> td); }
TimeSeriesMetricDeltaSet { public TimeSeriesMetricDeltaSet map(Function<? super MetricValue, ? extends MetricValue> fn) { return values_ .map( fn, (x) -> x.entrySet().stream().map((entry) -> apply_fn_(entry, fn)) ) .mapCombine(TimeSeriesMetricDeltaSet::new, TimeSeriesMetricDeltaSet::new); } TimeSeriesMetricDeltaSet(MetricValue td);  TimeSeriesMetricDeltaSet();  TimeSeriesMetricDeltaSet(Map<Tags, MetricValue> td);  TimeSeriesMetricDeltaSet(Stream<Entry<Tags, MetricValue>> td); boolean isEmpty(); int size(); boolean isScalar(); boolean isVector(); Optional<MetricValue> asScalar(); Optional<Map<Tags, MetricValue>> asVector(); Set<Tags> getTags(); Stream<MetricValue> streamValues(); Stream<Entry<Tags, MetricValue>> streamAsMap(Tags dfl); Stream<Entry<Tags, MetricValue>> streamAsMap(Set<Tags> dfl); Stream<Entry<Tags, MetricValue>> streamAsMap(); TimeSeriesMetricDeltaSet map(Function<? super MetricValue, ? extends MetricValue> fn); TimeSeriesMetricDeltaSet mapOptional(Function<? super MetricValue, Optional<? extends MetricValue>> fn); Any2<MetricValue, Map<Tags, MetricValue>> getValues(); @Override String toString(); }
TimeSeriesMetricDeltaSet { public TimeSeriesMetricDeltaSet map(Function<? super MetricValue, ? extends MetricValue> fn) { return values_ .map( fn, (x) -> x.entrySet().stream().map((entry) -> apply_fn_(entry, fn)) ) .mapCombine(TimeSeriesMetricDeltaSet::new, TimeSeriesMetricDeltaSet::new); } TimeSeriesMetricDeltaSet(MetricValue td);  TimeSeriesMetricDeltaSet();  TimeSeriesMetricDeltaSet(Map<Tags, MetricValue> td);  TimeSeriesMetricDeltaSet(Stream<Entry<Tags, MetricValue>> td); boolean isEmpty(); int size(); boolean isScalar(); boolean isVector(); Optional<MetricValue> asScalar(); Optional<Map<Tags, MetricValue>> asVector(); Set<Tags> getTags(); Stream<MetricValue> streamValues(); Stream<Entry<Tags, MetricValue>> streamAsMap(Tags dfl); Stream<Entry<Tags, MetricValue>> streamAsMap(Set<Tags> dfl); Stream<Entry<Tags, MetricValue>> streamAsMap(); TimeSeriesMetricDeltaSet map(Function<? super MetricValue, ? extends MetricValue> fn); TimeSeriesMetricDeltaSet mapOptional(Function<? super MetricValue, Optional<? extends MetricValue>> fn); Any2<MetricValue, Map<Tags, MetricValue>> getValues(); @Override String toString();  }