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()
.Modifier and Type | Method and Description |
---|---|
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. |
addAll, clear, remove, removeAll, retainAll, size
add, contains, containsAll, isEmpty, iterator, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
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()
See the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.