Skip to content

Commit

Permalink
Use Greedy integrator for MoreGatherers.distinctByKeepLast() (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit authored Oct 21, 2024
1 parent 59200a1 commit 5b9f447
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public Supplier<LinkedHashMap<U, T>> initializer() {

@Override
public Integrator<LinkedHashMap<U, T>, T, T> integrator() {
return (state, element, _) -> {
return Integrator.ofGreedy((state, element, _) -> {
state.put(keyExtractor.apply(element), element);
return true;
};
});
}

@Override
Expand Down

0 comments on commit 5b9f447

Please sign in to comment.