incubator-adffaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arjuna Wijeyekoon" <arj...@gmail.com>
Subject make ValueMap public
Date Tue, 24 Oct 2006 21:18:38 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message