I want to realize a program that contains a hashmap<integer,ArrayList<integer>>
and Arraylist<integer>
I want to test every value in arraylist if it is equal to the arraylist hashmap value
For example the first arraylist element with the first element in hashmap, the second arraylist element with a second element hashmap etc.
If are equal I incremete the counter and store it in a new hashmap that contains the keys and the counter
this is what i do
HashMap<Integer, Integer> sim = new HashMap<Integer, Integer>();
List<Integer> listOperateur = new ArrayList<Integer>();
for (Map.Entry<Integer, ArrayList<Integer>> e : hmm.entrySet()) {
//hmm and listOperateur Already established and filled
if (e.getValue().equals(listOperateur)) {
count++;
}
sim.put(e.getKey(), count);
}
}