Package com.apicatalog.rdf.canon
Class Permutator
- java.lang.Object
-
- com.apicatalog.rdf.canon.Permutator
-
- All Implemented Interfaces:
java.util.Iterator<java.lang.String[]>
final class Permutator extends java.lang.Object implements java.util.Iterator<java.lang.String[]>Iterate over all possible permutations of an array.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]arrayThe array we are permuting.private short[]countCounts for Heap's algorithm.private booleannextExistsDoes another permutation exist?.private intstateState for Heap's algorithm.
-
Constructor Summary
Constructors Constructor Description Permutator(java.lang.String[] input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()java.lang.String[]next()(package private) voidswap(int i, int j)
-