public class CollectionPermutationIter<E>
extends java.lang.Object
Constructor and Description |
---|
CollectionPermutationIter(java.util.List<E> objectsArray)
Uses a permArray like [1,1,1,2] where some of the permutations are not
relevant.
|
CollectionPermutationIter(java.util.List<E> objectsArray,
ArrayPermutationsIter permuter) |
CollectionPermutationIter(java.util.Set<E> objectsSet)
Note: the Set interface does not guarantee iteration order.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getCurrentPermutationArray() |
java.util.List<E> |
getNextArray()
On first call, returns the source as an array; on any other call
thereafter, a new permutation
|
java.util.Set<E> |
getNextSet()
Wrap result to a Set.
|
boolean |
hasNext() |
java.lang.String |
toString() |
public CollectionPermutationIter(java.util.Set<E> objectsSet)
objectsSet
- public CollectionPermutationIter(java.util.List<E> objectsArray)
objectsArray
- permuter
- public CollectionPermutationIter(java.util.List<E> objectsArray, ArrayPermutationsIter permuter)
public boolean hasNext()
public java.util.List<E> getNextArray()
public java.util.Set<E> getNextSet()
public int[] getCurrentPermutationArray()
public java.lang.String toString()
toString
in class java.lang.Object