public class CompositeBag<E> extends CompositeCollection<E> implements Bag<E>
Bag
implementation that allows for multiple occurrences of elements
in the nested collections and allows for them to be counted. In particular,
if the nested collections in turn conform to the Bag
interface, their
count(Object)
operation will be used to determine the composite
object count.Constructor and Description |
---|
CompositeBag(java.util.Collection<? extends E>... collections) |
Modifier and Type | Method and Description |
---|---|
int |
count(java.lang.Object o)
Queries how many times the specified object occurs in me.
|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
getIterables
public CompositeBag(java.util.Collection<? extends E>... collections)
public int count(java.lang.Object o)
Bag