org.teiid.query.util
Class Permutation

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

public class Permutation
extends Object


Constructor Summary
Permutation(Object[] items)
           
 
Method Summary
 Iterator<Object[]> generate()
          Create list of arrays of items, in all possible permutations (that's n! permutations).
 Iterator<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(Object[] items)
Method Detail

generate

public Iterator<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 Iterator<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 © 2012. All Rights Reserved.