I have little troubles expressing my intentions using Java Generics.
I want to iterate over a map where each entry's value is a list of some type, that is
Map<?, ? extends List<?>> map
What would the type of a iterator over the entry-set of this map look like?
My first guess was
Iterator<Map.Entry<?, ? extends List<?>>> it=map.entrySet().iterator()
but the compiler tells me
/tmp/16462/Test.java:9: incompatible types
found : java.util.Iterator<java.util.Map.Entry><capture of ?,capture of ? extends java.util.List><?>>>
required: java.util.Iterator<java.util.Map.Entry><?,java.util.List<?>>>
Iterator<Map.Entry><?,List<?>>> it = map.entrySet().iterator();
What does the compiler mean with 'capture of ?' ?
Thanks in advance