Functions at the input is a class whose 3 fields are HashMap and 3 possible values of these fields (3 possible values). Next I need to determine if one of those 3 values lies in each map. And if it occurs in some kind of map, then I increase the internal counter. I run like this: I am passing the iterator and if there is a coincidence iterator.next () with the possible field value, I increment the counter.
In the process there was such an error:
at java.util.HashMap$HashIterator.nextEntry(Unknown Source) at java.util.HashMap$KeyIterator.next(Unknown Source)
What does it mean?
Iterator<Segment.Age> ageIterator = campaign.getTarget().getAge().iterator(); while ( ageIterator.hasNext() ){ if ( mapFromAgeToAgeDistribution.containsKey(ageIterator.next()) ){ ageFitness += mapFromAgeToAgeDistribution.get(ageIterator.next()); // рагается на эту строчку } }