|
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 Location : initializer Killed by : com.pivovarit.gatherers.blackbox.ZipWithIndexTest.[engine:junit-jupiter]/[class:com.pivovarit.gatherers.blackbox.ZipWithIndexTest]/[method:shouldZipEmptyStream()] replaced return value with null for com/pivovarit/gatherers/ZipWithIndexGatherer::initializer → KILLED
|
| 17 |
|
1.1 Location : lambda$integrator$0 Killed by : none replaced boolean return with true for com/pivovarit/gatherers/ZipWithIndexGatherer::lambda$integrator$0 → SURVIVED
Covering tests
Covered by tests:
- com.pivovarit.gatherers.blackbox.ZipWithIndexTest.[engine:junit-jupiter]/[class:com.pivovarit.gatherers.blackbox.ZipWithIndexTest]/[method:shouldZipWithIndex()]
2.2 Location : integrator Killed by : com.pivovarit.gatherers.blackbox.ZipWithIndexTest.[engine:junit-jupiter]/[class:com.pivovarit.gatherers.blackbox.ZipWithIndexTest]/[method:shouldZipWithIndex()] replaced return value with null for com/pivovarit/gatherers/ZipWithIndexGatherer::integrator → KILLED
3.3 Location : lambda$integrator$0 Killed by : none replaced boolean return with false for com/pivovarit/gatherers/ZipWithIndexGatherer::lambda$integrator$0 → SURVIVED
Covering tests
Covered by tests:
- com.pivovarit.gatherers.blackbox.ZipWithIndexTest.[engine:junit-jupiter]/[class:com.pivovarit.gatherers.blackbox.ZipWithIndexTest]/[method:shouldZipWithIndex()]
|