Permutations are a key abstraction that aren’t covered by the standard libraries and haven’t been well catered for outside of them (as far as I know).
My crinch library now addresses this with a new package for handling permutations. It’s efficiently implemented for speed and memory usage, robustly coded for use in security sensitive contexts, and has a nice fluent API.
It’s under the Apache 2.0 license and available from my Google Code project*.
Here’s the gist…
(*) No jar binaries yet; take the source, or build via Maven.