public List<T> nextPermutationAsList()
    {
        List<T> permutation = new ArrayList<T>(elements.length);
        return nextPermutationAsList(permutation);
    }
public List < T > nextPermutationAsList ( ) { List < T > permutation = new ArrayList < T > ( elements . length ) ; return nextPermutationAsList ( permutation ) ; }
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.