public class PermutationGenerator<E>
extends java.lang.Object
implements java.util.Iterator<java.util.List<E>>
Constructor and Description |
---|
PermutationGenerator(java.util.Collection<E> items)
WARNING: Don't make n too large.
|
PermutationGenerator(java.lang.Iterable<E> items) |
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
getTotal() |
boolean |
hasNext() |
java.util.List<E> |
next()
Generate next permutation (algorithm from Rosen p.
|
void |
remove() |
void |
reset() |
public PermutationGenerator(java.util.Collection<E> items)
items
- the items to permutepublic PermutationGenerator(java.lang.Iterable<E> items)
public void reset()
public java.math.BigInteger getTotal()
public boolean hasNext()
hasNext
in interface java.util.Iterator<java.util.List<E>>
public java.util.List<E> next()
next
in interface java.util.Iterator<java.util.List<E>>
public void remove()
remove
in interface java.util.Iterator<java.util.List<E>>