java.util.Pair

assembling signals assembling.signals at yandex.ru
Tue Mar 30 12:39:12 UTC 2010


Hi!

Do you mean, it would be good to have a "standard" implementing class of the interface Map.Entry<K,V> ?
This does exist: AbstractMap.SimpleEntry<K,V>. Well, of course both the interface and the class are
somewhat 'hidden', but nevertheless, they do exist.



30.03.10, 16:08, "Weijun Wang" <Weijun.Wang at Sun.COM>:

> Hi All
>  
>  There are multiple CRs asking for a java.util.Pair class:
>  
>     4983155
>     6229146
>     4947273
>  
>  I know such a simple thing can be made very complex and everyone might want to add a new method into it. How about we just make it most primitive? Simply an immutable and Serializable class, two final fields, one constructor, two getters (?), and no static factory methods. (S)he who does the real implementation has the privilege to choose between head/tail and car/cdr.
>  
>  Thanks
>  Max
>  
>  
>  

-- 
Здесь спама нет http://mail.yandex.ru/nospam/sign



More information about the core-libs-dev mailing list