org.teiid.query.util
Class Permutation

java.lang.Object
  extended by org.teiid.query.util.Permutation

public class Permutation
extends java.lang.Object


Constructor Summary
Permutation(java.lang.Object[] items)
           
 
Method Summary
 java.util.Iterator<java.lang.Object[]> generate()
          Create list of arrays of items, in all possible permutations (that's n! permutations).
 java.util.Iterator<java.lang.Object[]> 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<java.lang.Object[]> 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<java.lang.Object[]> 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 © 2010. All Rights Reserved.