Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Collections2.filter から返されるコレクションは変更できず、その反復子も変更できません。コレクションのフィルタリングされたライブビューを返すが、変更可能なイテレータを使用する同様のものはありますか? remove()イテレータでメソッドを使用する必要があります。
remove()
ありがとう。
どうnew ArrayList(Collections2.filter(...))ですか?何らかの理由でフィルターの使用を主張する場合。
new ArrayList(Collections2.filter(...))
ちなみに、Collections2.filterは変更不可ではありません。Predicate論理要素のみを許可するコレクションです。
Collections2.filter
Predicate