I have Multimap. Example:
00254=[00255, 2074E, 2074E, 2074E, 2074E, 2074E, 2074E, 00010, 00010, 00010, 0006, 0006, 0006, 00010, R01018, R01018, 0006, 0006, R01018, R01018, R01018, 12062, S2202962, S2202962, R01018, 12062, 20466, 12062, 20466, 22636, 20466, 20466, 22636, 22636, 22636, 22636, 22636, 22636, 22636, 22636, 00255, 2074E, 2074E, 2074E, 2074E, 2074E]
00256=[00257, 2074E, 2074E, 2074E, 2074E, 00010, 2074E, 2074E, 0006, 00010, 00010, 00010, 0006, 0006, 0006, R01018, R01018, 0006, R01018, R01018, R01018, 12062, S2202962, S2202962, R01018, 12062, 20466, 12062, 20466, 20466, 20466, 22636, 22636, 22636, 22636, 22636, 22636, 22636, 22636, 22636, 00257, 2074E, 2074E, 2074E, 2074E, 00010]
I want to get the number of value including duplicate value.
- 00254=[00255:2, 2074E:11, 00010:4, 0006:5, R01018:6, ...]
- 00256=[00257:2, 2074E:10, 00010:5, 0006:5, R01018:7, ...]
Is it possible to get duplicate number?
Thanks.
R01018... not a 10-based number. - AxelH00254the count would be the sum of2+11+4+5+6+...? - AndreasMap<YourValue, Integer>to count. But you need to try first. That "value" is nothing but a List, so you can simply use the same logic. See Count occurrences of words in ArrayList - AxelHMultimap? Perhapsget(key).size()is what you're looking for? - Andreas