hash map filter to generate multiple list of keys

I really like to know other than iterate over through the java hash-map again and again, is there any direct way to generate a list of keys based on combined value criteria, like in my case I want those keys whose total sum of all value should be equal to or smaller to 100 (max-size)

I know I am not good to make statement correct but here is an example to clarify what I try to achieve

This is the input program :

int max_size = 100;

HashMap cache = new HashMap

Read More »

By: StackOverFlow - Friday, 13 April

Related Posts