Hi,
I'd like to make
org.apache.myfaces.trinidad.component.ValueMap
a public utility class.
This class maintains a mapping from key to value, and also from value to
key. It is useful to create
ClientRowKeyManager implementations (See
http://issues.apache.org/jira/browse/ADFFACES-210).
I'd like to call it
org.apache.myfaces.trinidad.util.ReverseMap
And I will cleanup the api so that the Map interface is fully implemented
(along with the remove operations).
What do you think about making this class public?
??????
If we do make this public, which of the following apis is better?
ReverseMap<K,V> map;
V value;
K key = map.getKey(value); // option 1
or
Map<V,K> valuemap = map.getReverseMap(); // option 2
K Key = valuemap.get(value);
???
or should we have both?
--arjuna
|