What do you folks think about adding a new method like this to MapUtils?
public void <K1,K2,V> fillTransitiveMap(Map<K1,K2> keysMap, Map<K2,V>
valuesMap, Map<K,V> result)
{
for (K1 key1 : keysMap.keySet())
{
K2 key2 = keysMap.get(key1);
V value = valuesMap.get(key2);
resultMap.put(key1, value);
}
}
I don't know about the name, but basically it just bridges the gap
between two maps. We had a use for this at work today and I thought
it might be something generally useful.
James
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]