com.metamatrix.common.util
Class Permutation

java.lang.Object
  extended by com.metamatrix.common.util.Permutation

public class Permutation
extends java.lang.Object


Constructor Summary
Permutation(java.lang.Object[] items)
           
 
Method Summary
 java.util.Iterator generate()
          Create list of arrays of items, in all possible permutations (that's n! permutations).
 java.util.Iterator generate(int size)
          Create list of arrays of items, in all possible permutations (that's n! permutations).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Permutation

public Permutation(java.lang.Object[] items)
Method Detail

generate

public java.util.Iterator generate()
Create list of arrays of items, in all possible permutations (that's n! permutations).

Returns:
Iterator where each thing returned by the iterator is a permutation Object[]

generate

public java.util.Iterator generate(int size)
Create list of arrays of items, in all possible permutations (that's n! permutations).

Returns:
Iterator where each thing returned by the iterator is a permutation Object[] of length size


Copyright © 2009. All Rights Reserved.