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