E
- the element type in the collectionpublic class CompositeCollection<E>
extends java.util.AbstractCollection<E>
Modifier and Type | Class and Description |
---|---|
protected class |
CompositeCollection.CompositeCollectionItr
An iterator over the elements of this composite collection.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.util.Collection<? extends E>> |
subsets |
Constructor and Description |
---|
CompositeCollection(java.util.Collection<? extends E>... subsets)
Constructs this composite collection from the given array of subsets.
|
CompositeCollection(java.lang.Iterable<java.util.Collection<? extends E>> subsets)
Constructs this composite collection from the given collection of subsets.
|
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<E> |
iterator() |
int |
size() |
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected final java.util.List<java.util.Collection<? extends E>> subsets
public CompositeCollection(java.util.Collection<? extends E>... subsets)
subsets
- the collections containing the elements in this composite
collection.java.lang.NullPointerException
- if any of the subsets are null
.java.lang.IllegalArgumentException
- if all of the subsets are empty.public CompositeCollection(java.lang.Iterable<java.util.Collection<? extends E>> subsets)
subsets
- the collections containing the elements in this composite
collection.java.lang.NullPointerException
- if any of the subsets are null
.java.lang.IllegalArgumentException
- if all of the subsets are empty.Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.