edu.jas.util
Class CartesianProduct<E>

java.lang.Object
  extended by edu.jas.util.CartesianProduct<E>
All Implemented Interfaces:
java.lang.Iterable<java.util.List<E>>

public class CartesianProduct<E>
extends java.lang.Object
implements java.lang.Iterable<java.util.List<E>>

Cartesian product with iterator.

Author:
Heinz Kredel

Field Summary
 java.util.List<java.lang.Iterable<E>> comps
          data structure.
 
Constructor Summary
CartesianProduct(java.util.List<java.lang.Iterable<E>> comps)
          CartesianProduct constructor.
 
Method Summary
 java.util.Iterator<java.util.List<E>> iterator()
          Get an iterator over subsets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

comps

public final java.util.List<java.lang.Iterable<E>> comps
data structure.

Constructor Detail

CartesianProduct

public CartesianProduct(java.util.List<java.lang.Iterable<E>> comps)
CartesianProduct constructor.

Parameters:
comps - components of the cartesian product.
Method Detail

iterator

public java.util.Iterator<java.util.List<E>> iterator()
Get an iterator over subsets.

Specified by:
iterator in interface java.lang.Iterable<java.util.List<E>>
Returns:
an iterator.