|
Plexus v0.13.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
com.phoenixst.collections.AbstractUnmodifiableCollection
com.phoenixst.collections.CartesianProduct
public abstract class CartesianProduct
A 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()
.
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. |
Methods inherited from class com.phoenixst.collections.AbstractUnmodifiableCollection |
---|
addAll, clear, remove, removeAll, retainAll, size |
Methods inherited from class java.util.AbstractCollection |
---|
add, contains, containsAll, isEmpty, iterator, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
equals, hashCode |
Method Detail |
---|
public static final CartesianProduct leftProduct(Collection left, Collection right)
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.
public static final CartesianProduct rightProduct(Collection left, Collection right)
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.
public static final Iterator leftIterator(Collection left, Collection right)
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.
public static final Iterator rightIterator(Collection left, Collection right)
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.
public final Collection getLeftOperand()
public final Collection getRightOperand()
|
Plexus v0.13.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |