Closed GoogleCodeExporter closed 9 years ago
This is definitely working as intended. There's not really any sensible
non-confusing semantics here: there's no way to add the element back to the
original list, since we have no way of undoing the Function. If we tried
something hacky like having an internal List representing elements added onto
the end, we'd still be unable to support List.add(int, E), which just seems
weird if you're supporting some adds but not others.
The whole point of this method is to provide a *view*, not a copy: it's not
supposed to hold onto any data of its own, just the original list and the
Function.
Simply rejecting all mutations except removes is really the only
self-consistent semantics possible here.
Original comment by lowas...@google.com
on 1 Nov 2014 at 12:46
Ok, I understand your point... just thinking that should at least be
documented...
Original comment by cicoron...@gmail.com
on 1 Nov 2014 at 4:00
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:07
Original comment by cgdecker@google.com
on 5 Nov 2014 at 11:34
Original issue reported on code.google.com by
cicoron...@gmail.com
on 1 Nov 2014 at 12:41