I have a hashmap which is in the form <gameID, Achievement> in which Achievement is a user defined object which holds an AchievementID, AchievementName, and AchievementPoints:
[1003901=(901, Shoot 'em up, 100), 1001902=(902, Tango down, 15)]
I would like to add up the values based on AchievementPoints for the entire game, so in this case, I would add up 100 and 15. I tried to iterate through using the for each loop, however, I can't seem to figure out how to access the AchievementPoints member specifically and just use that value. Is there any way to just iterate through the hashmap and just add values based on a specific member of the object value?
Edit 1:
sorry, to clarify, my gameID is actually a combination where the first four numbers are the actual gameID and the next 3 are the achievementID. This was done to keep the id unique. That is why I would add both of those
Map<gameId, Achievement>only stores 1 achievement per game? Is HashMap.values() what you need?