Class Permutation


  • public class Permutation
    extends Object
    • Constructor Detail

      • Permutation

        public Permutation​(Object[] items)
    • Method Detail

      • generate

        public Iterator<Object[]> generate()
        Create list of arrays of items, in all possible permutations (that's n! permutations).
        Returns:
        Iterator where each thing returned by the iterator is a permutation Object[]
      • generate

        public Iterator<Object[]> generate​(int size)
        Create list of arrays of items, in all possible permutations (that's n! permutations).
        Returns:
        Iterator where each thing returned by the iterator is a permutation Object[] of length size