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
-
ClassesClassDescriptionAbstract implementation of the
MultiSetinterface to simplify the creation of subclass implementations.Inner class EntrySetIterator.Inner class MultiSetEntry.Mutable integer class for storing the data.Inner class UniqueSetIterator.Abstract implementation of theMultiSetinterface to simplify the creation of subclass implementations.Inner class AbstractEntry.Inner class EntrySet.Inner class UniqueSet.Decorates anotherMultiSetto provide additional behavior.Decorates anotherSortedMultiSetto provide additional behavior.HashMultiSet<E>ImplementsMultiSet, using aHashMapto provide the data storage.Decorates anotherMultiSetto validate that additions match a specified predicate.Decorates anotherSortedMultiSetto validate that additions match a specified predicate.Decorates anotherMultiSetto synchronize its behavior for a multithreaded environment.Decorates anotherSortedMultiSetto synchronize its behavior for a multithreaded environment.Decorates anotherMultiSetto transform objects that are added.Decorates anotherSortedMultiSetto transform objects that are added.TreeMultiSet<E>ImplementsSortedMultiSet, using aTreeMapto provide the data storage.Decorates anotherMultiSetto ensure it can't be altered.Decorates anotherSortedMultiSetto ensure it can't be altered.