commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arun Thomas" <>
Subject RE: [collections] CollectionUtils.getCardinalityMap JavaDoc
Date Mon, 08 Sep 2003 16:08:52 GMT
I'm not sure if it makes sense to call it an "entry that maps to null" but consider that the
the cardinal map returned by this function will be accessed in the following manner:

 Integer x = returnedMap.get(obj);

That statement may just be pointing out that instead of returning Integer(0) for objects that
weren't in the collection, a null will be returned instead - as you pointed out, an object
not in the collection will not be mapped to anything, and so, when used as a key, will lead
to a null value.  

Perhaps the doc could be clarified.  


-----Original Message-----
From: Janek Bogucki [] 
Sent: Saturday, September 06, 2003 6:36 PM
To: Jakarta Commons Developers List
Subject: [collections] CollectionUtils.getCardinalityMap JavaDoc

In CollectionUtils.getCardinalityMap the documentation notes the meaning of an entry that
maps to null but I don't see how any such entry can exist in the returned map as all the keys
in the map come from the collection parameter and will map to >=1. Have I missed something?

View raw message