MultiSet, using a HashMap to provide the
data storage. This is the standard implementation of a multiset.
A MultiSet stores each object in the collection together with a
count of occurrences. Extra methods on the interface allow multiple copies
of an object to be added or removed at once.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Serial version lock |
| Access | Constructor and Description |
|---|---|
| public | |
| public | HashMultiSet(final Collection<? extends E>
a collection to copy into this multiset coll)Constructs a multiset containing all the members of the given collection. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | writeObject(final ObjectOutputStream
the output stream out)Write the multiset out using a custom routine. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serial version lock | |
| HashMultiSet | back to summary |
|---|---|
| public HashMultiSet() Constructs an empty | |
| HashMultiSet | back to summary |
|---|---|
| public HashMultiSet(final Collection<? extends E> coll) Constructs a multiset containing all the members of the given collection.
| |
| readObject | back to summary |
|---|---|
| private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException Read the multiset in using a custom routine.
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(final ObjectOutputStream out) throws IOException Write the multiset out using a custom routine.
| |