Java 7中有ImmutableEnumSet的计划吗? [英] Are there plans for ImmutableEnumSet in Java 7?
本文介绍了Java 7中有ImmutableEnumSet的计划吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
你可以使用Google收藏(Guava)获得不可变的EnumSet。
资源:
I want to have all the efficiencies of EnumSet and pass it around without worrying that somebody would modify it.
解决方案
You can get an immutable EnumSet with Google collections (Guava).
Resources :
- Guava home page
- Google-collections bug tracker - immutable enum set convenience constructor
- Google documentation - Sets.immutableEnumSet()
这篇关于Java 7中有ImmutableEnumSet的计划吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文