java.lang.Object | +--org.apache.commons.collections.collection.SynchronizedCollection | +--org.apache.commons.collections.bag.SynchronizedBag | +--org.apache.commons.collections.bag.SynchronizedSortedBagAll Implemented Interfaces:
SynchronizedSortedBag(SortedBag bag) Constructor that wraps (not copies). |
SynchronizedSortedBag(Bag bag, Object lock) Constructor that wraps (not copies). |
synchronized Comparator | |
static SortedBag | Factory method to create a synchronized sorted bag. |
synchronized Object | first() |
synchronized Object | last() |
protected SynchronizedSortedBag(Bag bag, Object lock)
- if bag is nullprotected SynchronizedSortedBag(SortedBag bag)
- if bag is nullpublic synchronized Comparator comparator()
public static SortedBag decorate(SortedBag bag)
- if bag is nullpublic synchronized Object first()
protected SortedBag getSortedBag()
public synchronized Object last()
SortedBag
to synchronize its behaviour for a multi-threaded environment. Methods are synchronized, then forwarded to the decorated bag. Iterators must be separately synchronized around the loop.