Android Utililty Methods String Permutation

List of utility methods to do String Permutation

Description

The list of methods to do String Permutation are organized into topic(s).

Method

booleangetNextPermutation(StringBuilder sb)
get Next Permutation
List<Character> list = asList(sb.toString().toCharArray());
boolean ret = getNextPermutation(list);
Object[] array = list.toArray();
sb.delete(0, sb.length());
sb.append(toCharArray(array));
return ret;
booleangetRandomPermutation(StringBuilder sb)
get Random Permutation
for (int i = 0; i != sb.length(); ++i) {
    if (!getNextPermutation(sb))
        return false;
return true;