com.phoenixst.collections
public abstract class CartesianProduct extends AbstractUnmodifiableCollection implements Serializable
Collection
whose elements are all of the ordered
pairs (x, y), where x is from the first delegate collection and y
is from the second. Here, the elements are instances of OrderedPair. This class has no public constructors, please use
the provided factory methods. If both delegate collections are
sets, then this collection will be as well, except that it does
not conform to the Set interface with regards to Set#equals(java.lang.Object) and Set#hashCode().
Since: 1.0
Version: $Revision: 1.2 $
Method Summary | |
---|---|
Collection | getLeftOperand() |
Collection | getRightOperand() |
static Iterator | leftIterator(Collection left, Collection right)
Returns an Iterator over the elements of the
product of the specified collections with the left one
controlling the outer loop. |
static CartesianProduct | leftProduct(Collection left, Collection right)
Creates and returns a new CartesianProduct of the
specified collections with the left one controlling the outer
loop of its iterator. |
static Iterator | rightIterator(Collection left, Collection right)
Returns an Iterator over the elements of the
product of the specified collections with the right one
controlling the outer loop. |
static CartesianProduct | rightProduct(Collection left, Collection right)
Creates and returns a new CartesianProduct of the
specified collections with the right one controlling the outer
loop of its iterator. |
Iterator
over the elements of the
product of the specified collections with the left one
controlling the outer loop. This factory method is preferable
when the left collection is more expensive to use than the
right one.CartesianProduct
of the
specified collections with the left one controlling the outer
loop of its iterator. This factory method is preferable when
the left collection is more expensive to use than the right
one.Iterator
over the elements of the
product of the specified collections with the right one
controlling the outer loop. This factory method is preferable
when the right collection is more expensive to use than the
left one.CartesianProduct
of the
specified collections with the right one controlling the outer
loop of its iterator. This factory method is preferable when
the right collection is more expensive to use than the left
one.