Closed GoogleCodeExporter closed 9 years ago
The documentation clearly states that the XXX.filter are views. So they have to
be
called as many times as needed.
Quoting the doc: "Many of the filtered set's methods, such as size(), iterate
across
every element in the underlying set and determine which elements satisfy the
filter.
When a live view is not needed, it may be faster to copy
Iterables.filter(unfiltered,
predicate) and use the copy."
If you need it to be called only once, consider using Iterables.filter instead
of
Sets.filter.
Original comment by ogregoire
on 15 Jan 2010 at 9:57
Indeed so, thank you. This issue should be marked WAI now.
Original comment by ffa...@gmail.com
on 15 Jan 2010 at 10:03
Original comment by kevinb@google.com
on 15 Jan 2010 at 9:13
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:16
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:10
Original issue reported on code.google.com by
ffa...@gmail.com
on 15 Jan 2010 at 4:53