Package org.apache.commons.collections.bag
This package contains implementations of the
Bag
and
SortedBag
interfaces.
A bag stores an object and a count of the number of occurences of the object.
The following implementations are provided in the package:
- HashBag - implementation that uses a HashMap to store the data
- TreeBag - implementation that uses a TreeMap to store the data
The following decorators are provided in the package:
- Synchronized - synchronizes method access for multi-threaded environments
- Unmodifiable - ensures the bag cannot be altered
- Predicated - ensures that only elements that are valid according to a predicate can be added
- Typed - ensures that only elements that are of a specific type can be added
- Transformed - transforms each element added to the bag
-
Class Summary Class Description AbstractBagDecorator Deprecated. Please use Apache Commons Collections 4 instead.AbstractMapBag Deprecated. Please use Apache Commons Collections 4 instead.AbstractSortedBagDecorator Deprecated. Please use Apache Commons Collections 4 instead.HashBag Deprecated. Please use Apache Commons Collections 4 instead.PredicatedBag Deprecated. Please use Apache Commons Collections 4 instead.PredicatedSortedBag Deprecated. Please use Apache Commons Collections 4 instead.SynchronizedBag Deprecated. Please use Apache Commons Collections 4 instead.SynchronizedSortedBag Deprecated. Please use Apache Commons Collections 4 instead.TransformedBag Deprecated. Please use Apache Commons Collections 4 instead.TransformedSortedBag Deprecated. Please use Apache Commons Collections 4 instead.TreeBag Deprecated. Please use Apache Commons Collections 4 instead.TypedBag Deprecated. Please use Apache Commons Collections 4 instead.TypedSortedBag Deprecated. Please use Apache Commons Collections 4 instead.UnmodifiableBag Deprecated. Please use Apache Commons Collections 4 instead.UnmodifiableSortedBag Deprecated. Please use Apache Commons Collections 4 instead.