Google Collections - a modifiable iterator from collections. Filter?

The collection returned from Collections2.filter is not modifiable, as well as its iterator. Is there anything similar that will return my filtered live view of the collection, but with a modifiable iterator? I need to use a method remove()on an iterator.

Thank.

+3
source share
1 answer

How about new ArrayList(Collections2.filter(...))? If for some reason you insist on using a filter.

By the way, Collections2.filterit is not unmodifiable. This is a collection that allows only logical elements Predicate.

-1
source

All Articles