#Vector<Map.Entry<String,Integer>> summing up all the Integer values for the same String value

3 messages · Page 1 of 1 (latest)

vestal hornet
#

Hello,
I have above mentioned Vector containing entries with k and v.
The k's can occure multiple times within the Vector and have different v values.
What im trying to do is counting all the v values for the same k within the Vector.
Ive added a Screenshot from my current function.
My current function is working within my normal Counting class.
But what i now need is a Benchmark for my class using a runnable with different counts of threads using.
Finally the words have to be added with their final values into a treemap
Since i implemented that my Sumup function is not working.
Is there a different way?

vestal hornet
#

I tried this now and all i get is console printing me null same as before

#

I got it, i was calling the sumup function wrongly 😄 needed to wait for the shutdown of the executor