java.lang.Object | +--org.apache.commons.collections.collection.AbstractCollectionDecorator | +--org.apache.commons.collections.collection.TransformedCollection | +--org.apache.commons.collections.bag.TransformedBag | +--org.apache.commons.collections.bag.TransformedSortedBagAll Implemented Interfaces:
TransformedSortedBag(SortedBag bag, Transformer transformer) Constructor that wraps (not copies). |
Comparator | |
static SortedBag | decorate(SortedBag bag, Transformer transformer) Factory method to create a transforming sorted bag. |
Object | first() |
Gets the decorated bag. | |
Object | last() |
protected TransformedSortedBag(SortedBag bag, Transformer transformer)
- if bag or transformer is nullpublic Comparator comparator()
public static SortedBag decorate(SortedBag bag, Transformer transformer)
- if bag or transformer is nullpublic Object first()
protected SortedBag getSortedBag()
public Object last()
SortedBag
to transform objects that are added. The add methods are affected by this class. Thus objects must be removed or searched for using their transformed form. For example, if the transformation converts Strings to Integers, you must use the Integer form to remove objects.