## 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 | This package contains implementations of the `Bag` and `SortedBag` interfaces.

- - ### Uses of Bag in org.apache.commons.collections

    Subinterfaces of Bag in org.apache.commons.collections
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `SortedBag` Defines a type of `Bag` that maintains a sorted order among its unique representative members.

    Classes in org.apache.commons.collections that implement Bag
    Modifier and Type | Class and Description
    --- | ---
    `class` | `DefaultMapBag` Deprecated. Moved to bag subpackage as AbstractMapBag. Due to be removed in v4.0.
    `class` | `HashBag` Deprecated. Moved to bag subpackage and rewritten internally. Due to be removed in v4.0.
    `class` | `TreeBag` Deprecated. Moved to bag subpackage and rewritten internally. Due to be removed in v4.0.

    Fields in org.apache.commons.collections declared as Bag
    Modifier and Type | Field and 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 and 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 and Description
    --- | ---
    `boolean` | DefaultMapBag.`containsAll(Bag other)` Deprecated. Returns `true` 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 and Description
    --- | ---
    `class` | `AbstractBagDecorator` Decorates another `Bag` to provide additional behaviour.
    `class` | `AbstractMapBag` Abstract implementation of the `Bag` interface to simplify the creation of subclass implementations.
    `class` | `AbstractSortedBagDecorator` Decorates another `SortedBag` to provide additional behaviour.
    `class` | `PredicatedBag` Decorates another `Bag` to validate that additions match a specified predicate.
    `class` | `PredicatedSortedBag` Decorates another `SortedBag` to validate that additions match a specified predicate.
    `class` | `SynchronizedBag` Decorates another `Bag` to synchronize its behaviour for a multi-threaded environment.
    `class` | `SynchronizedSortedBag` Decorates another `SortedBag` to synchronize its behaviour for a multi-threaded environment.
    `class` | `TransformedBag` Decorates another `Bag` to transform objects that are added.
    `class` | `TransformedSortedBag` Decorates another `SortedBag` to transform objects that are added.
    `class` | `UnmodifiableBag` Decorates another `Bag` to ensure it can't be altered.
    `class` | `UnmodifiableSortedBag` Decorates another `SortedBag` to ensure it can't be altered.

    Methods in org.apache.commons.collections.bag that return Bag
    Modifier and Type | Method and Description
    --- | ---
    `static Bag` | SynchronizedBag.`decorate(Bag bag)` Factory method to create a synchronized bag.
    `static Bag` | UnmodifiableBag.`decorate(Bag bag)` Factory method to create an unmodifiable bag.
    `static Bag` | TypedBag.`decorate(Bag bag, Class type)` Factory method to create a typed bag.
    `static Bag` | PredicatedBag.`decorate(Bag bag, Predicate predicate)` Factory method to create a predicated (validating) bag.
    `static Bag` | TransformedBag.`decorate(Bag bag, Transformer transformer)` Factory method to create a transforming bag.
    `protected Bag` | AbstractBagDecorator.`getBag()` Gets the bag being decorated.
    `protected Bag` | SynchronizedBag.`getBag()` Gets the bag being decorated.
    `protected Bag` | PredicatedBag.`getBag()` Gets the decorated bag.
    `protected Bag` | TransformedBag.`getBag()` Gets the decorated bag.

    Methods in org.apache.commons.collections.bag with parameters of type Bag
    Modifier and Type | Method and Description
    --- | ---
    `static Bag` | SynchronizedBag.`decorate(Bag bag)` Factory method to create a synchronized bag.
    `static Bag` | UnmodifiableBag.`decorate(Bag bag)` Factory method to create an unmodifiable bag.
    `static Bag` | TypedBag.`decorate(Bag bag, Class type)` Factory method to create a typed bag.
    `static Bag` | PredicatedBag.`decorate(Bag bag, Predicate predicate)` Factory method to create a predicated (validating) bag.
    `static Bag` | TransformedBag.`decorate(Bag bag, Transformer transformer)` Factory method to create a transforming bag.

    Constructors in org.apache.commons.collections.bag with parameters of type Bag
    Constructor and 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).

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.