E - The type of the elements.public class PowerSet<E>
extends java.util.AbstractCollection<java.util.Collection<E>>
| Modifier and Type | Class and Description |
|---|---|
static class |
PowerSet.BitSetIterable
Iterable that creates BitSetIterator instances.
|
static class |
PowerSet.BitSetIterator
Iterator that iterates through all possible BitSets of a given length.
|
static class |
PowerSet.PowerSetIterator<E>
Iterator that produces the power set of a given list.
|
| Constructor and Description |
|---|
PowerSet(java.util.Collection<E> c)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<java.util.Collection<E>> |
iterator() |
static <E> PowerSet<E> |
powerSet(java.util.Collection<E> c)
Produce the power set of a collection
|
int |
size() |
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic PowerSet(java.util.Collection<E> c)
c - The collection whose power set should be generated. This collection must have stable iteration
order so that iterating multiple times over it always produces elements in the same order! For lists this is
already the case. Other types of collections will be copied into an ArrayList to guarantee stable iteration
order.public int size()
public java.util.Iterator<java.util.Collection<E>> iterator()
public static <E> PowerSet<E> powerSet(java.util.Collection<E> c)
E - The type of the elements.c - The collection whose power set should be generated