Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- values count
- A 2
- B 3
- C 4
- A 5
- C 1
- Flowable<Response> responseFlowable = Flowable.fromIterable(generateList());
- replayResponseFlowable.toMultimap(response -> response.getValues(), response -> response.getCount()).subscribe(groups-> calculateSum(groups));
- }
- private static void calculateSum(Map<String,Collection<Integer>> groups)
- {
- //iterate over the map and calculate sum for each of the groups.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement