code: public List<T> nextPermutationAsList()
      {
          List<T> permutation = new ArrayList<T>(elements.length);
          return nextPermutationAsList(permutation);
      }
docs: Generate the next permutation and return a list containing
  the elements in the appropriate order.
  @see #nextPermutationAsList(java.util.List)
  @see #nextPermutationAsArray()
  @return The next permutation as a list.