# Package org.apache.commons.collections4.multiset

package org.apache.commons.collections4.multiset
Implements the `MultiSet` interface. A multiset stores an object and a count of the number of occurrences of the object.

The following implementations are provided in the package:

- HashMultiSet - implementation that uses a HashMap to store the data
- TreeMultiSet - implementation that uses a TreeMap to store the data

The following decorators are provided in the package:

- Predicated - ensures that only elements that are valid according to a predicate can be added
- Synchronized - synchronizes method access for multithreaded environments
- Transformed - transforms elements as they are added
- Unmodifiable - ensures the multiset cannot be altered

- Related Packages
  Package
  Description
  org.apache.commons.collections4
  Interfaces and utilities shared across all packages.
- Classes
  Class
  Description
  AbstractMapMultiSet<E>
  Abstract implementation of the `MultiSet` interface to simplify the creation of subclass implementations.
  AbstractMapMultiSet.EntrySetIterator<E>
  Inner class EntrySetIterator.
  AbstractMapMultiSet.MultiSetEntry<E>
  Inner class MultiSetEntry.
  AbstractMapMultiSet.MutableInteger
  Mutable integer class for storing the data.
  AbstractMapMultiSet.UniqueSetIterator<E>
  Inner class UniqueSetIterator.
  AbstractMultiSet<E>
  Abstract implementation of the `MultiSet` interface to simplify the creation of subclass implementations.
  AbstractMultiSet.AbstractEntry<E>
  Inner class AbstractEntry.
  AbstractMultiSet.EntrySet<E>
  Inner class EntrySet.
  AbstractMultiSet.UniqueSet<E>
  Inner class UniqueSet.
  AbstractMultiSetDecorator<E>
  Decorates another `MultiSet` to provide additional behavior.
  AbstractSortedMultiSetDecorator<E>
  Decorates another `SortedMultiSet` to provide additional behavior.
  HashMultiSet<E>
  Implements `MultiSet`, using a `HashMap` to provide the data storage.
  PredicatedMultiSet<E>
  Decorates another `MultiSet` to validate that additions match a specified predicate.
  PredicatedSortedMultiSet<E>
  Decorates another `SortedMultiSet` to validate that additions match a specified predicate.
  SynchronizedMultiSet<E>
  Decorates another `MultiSet` to synchronize its behavior for a multithreaded environment.
  SynchronizedSortedMultiSet<E>
  Decorates another `SortedMultiSet` to synchronize its behavior for a multithreaded environment.
  TransformedMultiSet<E>
  Decorates another `MultiSet` to transform objects that are added.
  TransformedSortedMultiSet<E>
  Decorates another `SortedMultiSet` to transform objects that are added.
  TreeMultiSet<E>
  Implements `SortedMultiSet`, using a `TreeMap` to provide the data storage.
  UnmodifiableMultiSet<E>
  Decorates another `MultiSet` to ensure it can't be altered.
  UnmodifiableSortedMultiSet<E>
  Decorates another `SortedMultiSet` to ensure it can't be altered.