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 |
Modifier and Type | Interface | Description |
---|---|---|
interface |
SortedBag |
Defines a type of
Bag that maintains a sorted order among
its unique representative members. |
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.
|
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.
|
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,
java.lang.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.
|
Modifier and Type | Method | 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,
java.lang.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.
|
Modifier and Type | Class | 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 |
HashBag |
Implements
Bag , using a HashMap to provide the
data storage. |
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 |
TreeBag |
Implements
SortedBag , using a TreeMap to provide
the data storage. |
class |
UnmodifiableBag |
Decorates another
Bag to ensure it can't be altered. |
class |
UnmodifiableSortedBag |
Decorates another
SortedBag to ensure it can't be altered. |
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,
java.lang.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.
|
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,
java.lang.Class type) |
Factory method to create a typed bag.
|
static Bag |
UnmodifiableBag.decorate(Bag bag) |
Factory method to create an unmodifiable 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,
java.lang.Object lock) |
Constructor that wraps (not copies).
|
SynchronizedSortedBag(Bag bag,
java.lang.Object lock) |
Constructor that wraps (not copies).
|
TransformedBag(Bag bag,
Transformer transformer) |
Constructor that wraps (not copies).
|
Copyright © 2001-2017 Apache Software Foundation. All Rights Reserved.