首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Google Guava 库用法拾掇

2012-12-18 
Google Guava 库用法整理自:http://macrochen.iteye.com/blog/737058?参考: http://codemunchies.com/2009

Google Guava 库用法整理

自:http://macrochen.iteye.com/blog/737058

?

参考:
http://codemunchies.com/2009/10/beautiful-code-with-google-collections-guava-and-static-imports-part-1/ (2,3,4)
http://blog.publicobject.com

更多用法参考http://ajoo.iteye.com/category/119082

以前这么用:

                                ???????????
                                Guava的写法(Jakarta Commons中有类似的方法):


                                                                  现在这样写:



                                                                    Comparators.fromFunction的用法:
                                                                    以前这样写:

                                                                            private?static?final?BiMap<Integer,String>?NUMBER_TO_NAME_BIMAP; ????static?{ ????NUMBER_TO_NAME_BIMAP?=?Maps.newHashBiMap(); ????NUMBER_TO_NAME_BIMAP.put(1,?"Hydrogen"); ????NUMBER_TO_NAME_BIMAP.put(2,?"Helium"); ????NUMBER_TO_NAME_BIMAP.put(3,?"Lithium"); ??} ????public?static?</

热点排行