2013年10月8日
摘要: Examplepublicstatic final ImmutableSet COLOR_NAMES =ImmutableSet.of( "red", "orange", "yellow", "green", "blue", "purple");classFoo{ Set bars; Foo(Set bars){ this.bars =ImmutableSet.copyOf(bars);// defensive copy! }}Why?Immutable objects ha 阅读全文
posted @ 2013-10-08 11:40 ZimZz 阅读(720) 评论(0) 推荐(0) 编辑