Uses of Interface
org.apache.commons.collections.Bag
Packages that use Bag
Package
Description
This package contains the interfaces and utilities shared across all the subpackages of this component.
-
Uses of Bag in org.apache.commons.collections
Subinterfaces of Bag in org.apache.commons.collectionsModifier and TypeInterfaceDescriptioninterface
Defines a type ofBag
that maintains a sorted order among its unique representative members.Classes in org.apache.commons.collections that implement BagModifier and TypeClassDescriptionclass
Deprecated.Moved to bag subpackage as AbstractMapBag.class
Deprecated.Moved to bag subpackage and rewritten internally.class
Deprecated.Moved to bag subpackage and rewritten internally.Fields in org.apache.commons.collections declared as BagModifier and TypeFieldDescriptionstatic final Bag
BagUtils.EMPTY_BAG
An empty unmodifiable bag.static final Bag
BagUtils.EMPTY_SORTED_BAG
An empty unmodifiable sorted bag.Methods in org.apache.commons.collections that return BagModifier and TypeMethodDescriptionstatic Bag
BagUtils.predicatedBag
(Bag bag, Predicate predicate) Returns a predicated (validating) bag backed by the given bag.static Bag
BagUtils.synchronizedBag
(Bag bag) Returns a synchronized (thread-safe) bag backed by the given bag.static Bag
BagUtils.transformedBag
(Bag bag, Transformer transformer) Returns a transformed bag backed by the given bag.static Bag
Returns a typed bag backed by the given bag.static Bag
BagUtils.unmodifiableBag
(Bag bag) Returns an unmodifiable view of the given bag.Methods in org.apache.commons.collections with parameters of type BagModifier and TypeMethodDescriptionboolean
DefaultMapBag.containsAll
(Bag other) Deprecated.Returnstrue
if the bag contains all elements in the given collection, respecting cardinality.static Bag
BagUtils.predicatedBag
(Bag bag, Predicate predicate) Returns a predicated (validating) bag backed by the given bag.boolean
Deprecated.Remove any members of the bag that are not in the given bag, respecting cardinality.static Bag
BagUtils.synchronizedBag
(Bag bag) Returns a synchronized (thread-safe) bag backed by the given bag.static Bag
BagUtils.transformedBag
(Bag bag, Transformer transformer) Returns a transformed bag backed by the given bag.static Bag
Returns a typed bag backed by the given bag.static Bag
BagUtils.unmodifiableBag
(Bag bag) Returns an unmodifiable view of the given bag. -
Uses of Bag in org.apache.commons.collections.bag
Classes in org.apache.commons.collections.bag that implement BagModifier and TypeClassDescriptionclass
Decorates anotherBag
to provide additional behaviour.class
Abstract implementation of theBag
interface to simplify the creation of subclass implementations.class
Decorates anotherSortedBag
to provide additional behaviour.class
ImplementsBag
, using aHashMap
to provide the data storage.class
Decorates anotherBag
to validate that additions match a specified predicate.class
Decorates anotherSortedBag
to validate that additions match a specified predicate.class
Decorates anotherBag
to synchronize its behaviour for a multi-threaded environment.class
Decorates anotherSortedBag
to synchronize its behaviour for a multi-threaded environment.class
Decorates anotherBag
to transform objects that are added.class
Decorates anotherSortedBag
to transform objects that are added.class
ImplementsSortedBag
, using aTreeMap
to provide the data storage.final class
Decorates anotherBag
to ensure it can't be altered.final class
Decorates anotherSortedBag
to ensure it can't be altered.Methods in org.apache.commons.collections.bag that return BagModifier and TypeMethodDescriptionstatic Bag
Factory method to create a predicated (validating) bag.static Bag
Factory method to create a synchronized bag.static Bag
TransformedBag.decorate
(Bag bag, Transformer transformer) Factory method to create a transforming bag.static Bag
Factory method to create a typed bag.static Bag
Factory method to create an unmodifiable bag.protected Bag
AbstractBagDecorator.getBag()
Gets the bag being decorated.protected Bag
PredicatedBag.getBag()
Gets the decorated bag.protected Bag
SynchronizedBag.getBag()
Gets the bag being decorated.protected Bag
TransformedBag.getBag()
Gets the decorated bag.Methods in org.apache.commons.collections.bag with parameters of type BagModifier and TypeMethodDescriptionstatic Bag
Factory method to create a predicated (validating) bag.static Bag
Factory method to create a synchronized bag.static Bag
TransformedBag.decorate
(Bag bag, Transformer transformer) Factory method to create a transforming bag.static Bag
Factory method to create a typed bag.static Bag
Factory method to create an unmodifiable bag.Constructors in org.apache.commons.collections.bag with parameters of type BagModifierConstructorDescriptionprotected
AbstractBagDecorator
(Bag bag) Constructor that wraps (not copies).protected
PredicatedBag
(Bag bag, Predicate predicate) Constructor that wraps (not copies).protected
SynchronizedBag
(Bag bag) Constructor that wraps (not copies).protected
SynchronizedBag
(Bag bag, Object lock) Constructor that wraps (not copies).protected
SynchronizedSortedBag
(Bag bag, Object lock) Constructor that wraps (not copies).protected
TransformedBag
(Bag bag, Transformer transformer) Constructor that wraps (not copies).