1 | package com.pivovarit.gatherers; | |
2 | ||
3 | import java.util.Map; | |
4 | import java.util.concurrent.atomic.AtomicLong; | |
5 | import java.util.function.Supplier; | |
6 | import java.util.stream.Gatherer; | |
7 | ||
8 | record ZipWithIndexGatherer<T>() implements Gatherer<T, AtomicLong, Map.Entry<T, Long>> { | |
9 | ||
10 | @Override | |
11 | public Supplier<AtomicLong> initializer() { | |
12 |
1
1. initializer : replaced return value with null for com/pivovarit/gatherers/ZipWithIndexGatherer::initializer → KILLED |
return AtomicLong::new; |
13 | } | |
14 | ||
15 | @Override | |
16 | public Integrator<AtomicLong, T, Map.Entry<T, Long>> integrator() { | |
17 |
3
1. lambda$integrator$0 : replaced boolean return with true for com/pivovarit/gatherers/ZipWithIndexGatherer::lambda$integrator$0 → SURVIVED 2. lambda$integrator$0 : replaced boolean return with false for com/pivovarit/gatherers/ZipWithIndexGatherer::lambda$integrator$0 → SURVIVED 3. integrator : replaced return value with null for com/pivovarit/gatherers/ZipWithIndexGatherer::integrator → KILLED |
return Integrator.ofGreedy((state, element, downstream) -> downstream.push(Map.entry(element, state.getAndIncrement()))); |
18 | } | |
19 | } | |
Mutations | ||
12 |
1.1 |
|
17 |
1.1 2.2 3.3 |