org.cicirello:jpt (maven): JavaPermutationTools (JPT) is a library for computation on permutations and sequences. JPT provides Java classes that enable representing and generating permutations and sequences, as well as performing computation on permutations and sequences. It includes implementations of a variety of permutation distance metrics as well as distance metrics on sequences (i.e., Strings, arrays, and other ordered data types). 
Keywords: edit-distance|permutation-distance|permutation-distance-metrics|permutations|sequences|string-distance