Uses of Interface
org.apache.commons.collections4.Bag
Packages that use Bag
Package
Description
Interfaces and utilities shared across all packages.
Implementations of the
Collection interface.-
Uses of Bag in org.apache.commons.collections4
Subinterfaces of Bag in org.apache.commons.collections4Fields in org.apache.commons.collections4 declared as BagModifier and TypeFieldDescriptionstatic final BagBagUtils.EMPTY_BAGDeprecated.An empty unmodifiable bag.static final BagBagUtils.EMPTY_SORTED_BAGDeprecated.An empty unmodifiable sorted bag.Methods in org.apache.commons.collections4 that return BagModifier and TypeMethodDescriptionstatic <E> Bag<E> BagUtils.collectionBag(Bag<E> bag) Deprecated.Returns a bag that complies to the Collection contract, backed by the given bag.static <E> Bag<E> BagUtils.emptyBag()Deprecated.Gets an emptyBag.static <K,V> Bag <V> MultiMapUtils.getValuesAsBag(MultiValuedMap<K, V> map, K key) Deprecated.Since 4.6.0, useMultiMapUtils.getValuesAsMultiSet(MultiValuedMap, Object)instead.static <E> Bag<E> BagUtils.predicatedBag(Bag<E> bag, Predicate<? super E> predicate) Deprecated.Returns a predicated (validating) bag backed by the given bag.static <E> Bag<E> BagUtils.synchronizedBag(Bag<E> bag) Deprecated.Returns a synchronized (thread-safe) bag backed by the given bag.static <E> Bag<E> BagUtils.transformingBag(Bag<E> bag, Transformer<? super E, ? extends E> transformer) Deprecated.Returns a transformed bag backed by the given bag.static <E> Bag<E> BagUtils.unmodifiableBag(Bag<? extends E> bag) Deprecated.Returns an unmodifiable view of the given bag.Methods in org.apache.commons.collections4 with parameters of type BagModifier and TypeMethodDescriptionstatic <E> Bag<E> BagUtils.collectionBag(Bag<E> bag) Deprecated.Returns a bag that complies to the Collection contract, backed by the given bag.static <E> Bag<E> BagUtils.predicatedBag(Bag<E> bag, Predicate<? super E> predicate) Deprecated.Returns a predicated (validating) bag backed by the given bag.static <E> Bag<E> BagUtils.synchronizedBag(Bag<E> bag) Deprecated.Returns a synchronized (thread-safe) bag backed by the given bag.static <E> Bag<E> BagUtils.transformingBag(Bag<E> bag, Transformer<? super E, ? extends E> transformer) Deprecated.Returns a transformed bag backed by the given bag.static <E> Bag<E> BagUtils.unmodifiableBag(Bag<? extends E> bag) Deprecated.Returns an unmodifiable view of the given bag. -
Uses of Bag in org.apache.commons.collections4.bag
Classes in org.apache.commons.collections4.bag that implement BagModifier and TypeClassDescriptionclassDeprecated.Since 4.6.0, useAbstractMultiSetDecoratorinstead.classDeprecated.Since 4.6.0, useAbstractMapMultiSetinstead.classDeprecated.Since 4.6.0, useAbstractSortedMultiSetDecoratorinstead.final classDeprecated.Since 4.6.0, no longer needed; aMultiSetalready complies with theCollectioncontract.final classDeprecated.Since 4.6.0, no longer needed; aSortedMultiSetalready complies with theCollectioncontract.classHashBag<E>Deprecated.Since 4.6.0, useHashMultiSetinstead.classDeprecated.Since 4.6.0, usePredicatedMultiSetinstead.classDeprecated.Since 4.6.0, usePredicatedSortedMultiSetinstead.classDeprecated.Since 4.6.0, useSynchronizedMultiSetinstead.classDeprecated.Since 4.6.0, useSynchronizedSortedMultiSetinstead.classDeprecated.Since 4.6.0, useTransformedMultiSetinstead.classDeprecated.Since 4.6.0, useTransformedSortedMultiSetinstead.classTreeBag<E>Deprecated.Since 4.6.0, useTreeMultiSetinstead.final classDeprecated.Since 4.6.0, useUnmodifiableMultiSetinstead.final classDeprecated.Since 4.6.0, useUnmodifiableSortedMultiSetinstead.Methods in org.apache.commons.collections4.bag that return BagModifier and TypeMethodDescriptionstatic <E> Bag<E> CollectionBag.collectionBag(Bag<E> bag) Deprecated.Factory method to create a bag that complies to the Collection contract.AbstractBagDecorator.decorated()Deprecated.Gets the bag being decorated.PredicatedBag.decorated()Deprecated.Gets the decorated bag.SynchronizedBag.getBag()Deprecated.Gets the bag being decorated.TransformedBag.getBag()Deprecated.Gets the decorated bag.static <E> Bag<E> TransformedBag.transformedBag(Bag<E> bag, Transformer<? super E, ? extends E> transformer) Deprecated.Factory method to create a transforming bag that will transform existing contents of the specified bag.static <E> Bag<E> TransformedBag.transformingBag(Bag<E> bag, Transformer<? super E, ? extends E> transformer) Deprecated.Factory method to create a transforming bag.static <E> Bag<E> UnmodifiableBag.unmodifiableBag(Bag<? extends E> bag) Deprecated.Factory method to create an unmodifiable bag.Methods in org.apache.commons.collections4.bag with parameters of type BagModifier and TypeMethodDescriptionstatic <E> Bag<E> CollectionBag.collectionBag(Bag<E> bag) Deprecated.Factory method to create a bag that complies to the Collection contract.static <E> PredicatedBag<E> PredicatedBag.predicatedBag(Bag<E> bag, Predicate<? super E> predicate) Deprecated.Factory method to create a predicated (validating) bag.static <E> SynchronizedBag<E> SynchronizedBag.synchronizedBag(Bag<E> bag) Deprecated.Factory method to create a synchronized bag.static <E> Bag<E> TransformedBag.transformedBag(Bag<E> bag, Transformer<? super E, ? extends E> transformer) Deprecated.Factory method to create a transforming bag that will transform existing contents of the specified bag.static <E> Bag<E> TransformedBag.transformingBag(Bag<E> bag, Transformer<? super E, ? extends E> transformer) Deprecated.Factory method to create a transforming bag.static <E> Bag<E> UnmodifiableBag.unmodifiableBag(Bag<? extends E> bag) Deprecated.Factory method to create an unmodifiable bag.Constructors in org.apache.commons.collections4.bag with parameters of type BagModifierConstructorDescriptionprotectedAbstractBagDecorator(Bag<E> bag) Deprecated.Constructor that wraps (not copies).CollectionBag(Bag<E> bag) Deprecated.Constructor that wraps (not copies).protectedPredicatedBag(Bag<E> bag, Predicate<? super E> predicate) Deprecated.Constructor that wraps (not copies).protectedSynchronizedBag(Bag<E> bag) Deprecated.Constructor that wraps (not copies).protectedSynchronizedBag(Bag<E> bag, Object lock) Deprecated.Constructor that wraps (not copies).protectedSynchronizedSortedBag(Bag<E> bag, Object lock) Deprecated.Constructor that wraps (not copies).protectedTransformedBag(Bag<E> bag, Transformer<? super E, ? extends E> transformer) Deprecated.Constructor that wraps (not copies). -
Uses of Bag in org.apache.commons.collections4.collection
Methods in org.apache.commons.collections4.collection that return BagModifier and TypeMethodDescriptionPredicatedCollection.Builder.createPredicatedBag()Deprecated.Since 4.6.0, usePredicatedCollection.Builder.createPredicatedMultiSet()instead.PredicatedCollection.Builder.createPredicatedBag(Bag<E> bag) Deprecated.Since 4.6.0, usePredicatedCollection.Builder.createPredicatedMultiSet(MultiSet)instead.Methods in org.apache.commons.collections4.collection with parameters of type BagModifier and TypeMethodDescriptionPredicatedCollection.Builder.createPredicatedBag(Bag<E> bag) Deprecated.Since 4.6.0, usePredicatedCollection.Builder.createPredicatedMultiSet(MultiSet)instead.
SortedMultiSetinstead; see theBagJavadoc for migration notes.