I have the following code, is there away to traverse the MVM without using
Iterator's and using the Types of the content of the TreeMap.  I've tried in
Eclipse and it flags the code with type safety warnings and errors.

MultiValueMap mvm = MultiValueMap.decorate(new TreeMap<Integer, String>());

Set<?> keys = mvm.keySet();
Iterator<?> it = keys.iterator();
Collection<?> collect = null;
Iterator<?> collectIT = null;
                     
while (it.hasNext())
{
  key = (MutableString)it.next();
  System.out.println(key);
                        
  collect = mvm.getCollection(key);
  if (collect != null)
  {
     collectIT = collect.iterator();
     while (collectIT.hasNext())
     {
        System.out.println((char[])collectIT.next());
     }
  }
}


Thanks

-- 
View this message in context: 
http://www.nabble.com/MultiValueMap-and-Generics-tp19224975p19224975.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to