mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-04 20:30:42 +07:00
testdata for IDEA-126778
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static java.util.stream.Collectors.groupingBy;
|
||||
import static java.util.stream.Collectors.mapping;
|
||||
|
||||
class Test {
|
||||
private static Map<Long, Long> multiDataPointsToPerTxnSummedValue(final Stream<Map.Entry<DateTime, Map<Long, Long>>> stream) {
|
||||
return stream.flatMap(e -> e.getValue().entrySet().stream().map(ex ->
|
||||
new Object() {
|
||||
Long txId = ex.getKey();
|
||||
DataPoint dataPoint = new DataPoint(e.getKey(), ex.getValue());
|
||||
}
|
||||
)).collect(groupingBy(t -> t.txId, mapping(t -> t.dataPoint, Collectors.summingLong(dataPoint -> dataPoint.getValue().longValue()))));
|
||||
}
|
||||
|
||||
static class MultiDataPoint {}
|
||||
static class DateTime {}
|
||||
|
||||
static class DataPoint {
|
||||
DataPoint(DateTime t, Long val) {}
|
||||
public Long getValue() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user