EntryType
- Type of item stored in this class@CodeReview(reviewer="Kevin R. Dixon",date="2008-02-08",changesNeeded=false,comments="Looks fine.") @CodeReview(reviewer="Kevin R. Dixon",date="2007-12-10",changesNeeded=false,comments="Minor updates to the javadoc.") @CodeReview(reviewer="Kevin R. Dixon",date="2006-07-18",changesNeeded=false,comments="Looks fine.") public class DefaultMultiCollection<EntryType> extends java.util.AbstractCollection<EntryType> implements java.io.Serializable, MultiCollection<EntryType>
DefaultMultiCollection
class implements a Collection
that just
contains a set of internal collections inside. This allows for easy
operations on as set of collections on the same object type.Constructor and Description |
---|
DefaultMultiCollection(java.util.Collection<? extends java.util.Collection<EntryType>> collections)
Creates a new instance of
DefaultMultiCollection . |
DefaultMultiCollection(java.util.Collection<EntryType> first,
java.util.Collection<EntryType> second)
Creates a new instance of
DefaultMultiCollection . |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.Object o) |
int |
getSubCollectionsCount()
Gets the number of sub-collections in the multi-collection.
|
java.util.Iterator<EntryType> |
iterator() |
int |
size() |
java.util.Collection<? extends java.util.Collection<EntryType>> |
subCollections()
Returns the sub-collections of the multi-collection.
|
add, addAll, clear, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public DefaultMultiCollection(java.util.Collection<EntryType> first, java.util.Collection<EntryType> second)
DefaultMultiCollection
.first
- The first collection to add.second
- The second collection to add.public DefaultMultiCollection(java.util.Collection<? extends java.util.Collection<EntryType>> collections)
DefaultMultiCollection
.collections
- The Collection of Collections to add.public boolean contains(java.lang.Object o)
public int size()
public int getSubCollectionsCount()
MultiCollection
getSubCollectionsCount
in interface MultiCollection<EntryType>
public java.util.Iterator<EntryType> iterator()
public java.util.Collection<? extends java.util.Collection<EntryType>> subCollections()
MultiCollection
subCollections
in interface MultiCollection<EntryType>