Closed GoogleCodeExporter closed 9 years ago
I looked at 20 Google callers to Collections.shuffle. The divide about evenly
into people who are manually cloning the list, people who really ought to be
manually cloning the list but aren't, and people who don't need to clone it.
I'd say that a functional version of shuffle is a good thing for us to have.
The complication is going to be in whether it's worth adding plain
Iterables.shuffle or whether we should opt for a more powerful API that can
choose n items with or without replacement in a streaming fashion (but special
cases for selecting one item from RandomAccess inputs) and whatever other
features people might want. We do have such a chooser utility internally, and
we should consider promoting it.
Original comment by cpov...@google.com
on 3 Apr 2013 at 6:29
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<issue id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:12
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:18
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:08
Original issue reported on code.google.com by
electrum
on 3 Apr 2013 at 2:20