Uses of Interface
org.apache.commons.collections.Bag
-
Packages that use Bag Package Description org.apache.commons.collections This package contains the interfaces and utilities shared across all the subpackages of this component.org.apache.commons.collections.bag -
-
Uses of Bag in org.apache.commons.collections
Subinterfaces of Bag in org.apache.commons.collections Modifier and Type Interface Description interface
SortedBag
Defines a type ofBag
that maintains a sorted order among its unique representative members.Classes in org.apache.commons.collections that implement Bag Modifier and Type Class Description class
DefaultMapBag
Deprecated.Moved to bag subpackage as AbstractMapBag.class
HashBag
Deprecated.Moved to bag subpackage and rewritten internally.class
TreeBag
Deprecated.Moved to bag subpackage and rewritten internally.Fields in org.apache.commons.collections declared as Bag Modifier and Type Field Description static Bag
BagUtils. EMPTY_BAG
An empty unmodifiable bag.static Bag
BagUtils. EMPTY_SORTED_BAG
An empty unmodifiable sorted bag.Methods in org.apache.commons.collections that return Bag Modifier and Type Method Description static 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
BagUtils. typedBag(Bag bag, Class type)
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 Bag Modifier and Type Method Description boolean
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
DefaultMapBag. retainAll(Bag other)
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
BagUtils. typedBag(Bag bag, Class type)
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 Bag Modifier and Type Class Description class
AbstractBagDecorator
Decorates anotherBag
to provide additional behaviour.class
AbstractMapBag
Abstract implementation of theBag
interface to simplify the creation of subclass implementations.class
AbstractSortedBagDecorator
Decorates anotherSortedBag
to provide additional behaviour.class
HashBag
ImplementsBag
, using aHashMap
to provide the data storage.class
PredicatedBag
Decorates anotherBag
to validate that additions match a specified predicate.class
PredicatedSortedBag
Decorates anotherSortedBag
to validate that additions match a specified predicate.class
SynchronizedBag
Decorates anotherBag
to synchronize its behaviour for a multi-threaded environment.class
SynchronizedSortedBag
Decorates anotherSortedBag
to synchronize its behaviour for a multi-threaded environment.class
TransformedBag
Decorates anotherBag
to transform objects that are added.class
TransformedSortedBag
Decorates anotherSortedBag
to transform objects that are added.class
TreeBag
ImplementsSortedBag
, using aTreeMap
to provide the data storage.class
UnmodifiableBag
Decorates anotherBag
to ensure it can't be altered.class
UnmodifiableSortedBag
Decorates anotherSortedBag
to ensure it can't be altered.Methods in org.apache.commons.collections.bag that return Bag Modifier and Type Method Description static Bag
PredicatedBag. decorate(Bag bag, Predicate predicate)
Factory method to create a predicated (validating) bag.static Bag
SynchronizedBag. decorate(Bag 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
TypedBag. decorate(Bag bag, Class type)
Factory method to create a typed bag.static Bag
UnmodifiableBag. decorate(Bag 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 Bag Modifier and Type Method Description static Bag
PredicatedBag. decorate(Bag bag, Predicate predicate)
Factory method to create a predicated (validating) bag.static Bag
SynchronizedBag. decorate(Bag 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
TypedBag. decorate(Bag bag, Class type)
Factory method to create a typed bag.static Bag
UnmodifiableBag. decorate(Bag bag)
Factory method to create an unmodifiable bag.Constructors in org.apache.commons.collections.bag with parameters of type Bag Constructor Description AbstractBagDecorator(Bag bag)
Constructor that wraps (not copies).PredicatedBag(Bag bag, Predicate predicate)
Constructor that wraps (not copies).SynchronizedBag(Bag bag)
Constructor that wraps (not copies).SynchronizedBag(Bag bag, Object lock)
Constructor that wraps (not copies).SynchronizedSortedBag(Bag bag, Object lock)
Constructor that wraps (not copies).TransformedBag(Bag bag, Transformer transformer)
Constructor that wraps (not copies).
-