java.lang.Object | +--org.apache.commons.collections.collection.AbstractCollectionDecorator | +--org.apache.commons.collections.collection.PredicatedCollection | +--org.apache.commons.collections.bag.PredicatedBag | +--org.apache.commons.collections.bag.PredicatedSortedBagAll Implemented Interfaces:
PredicatedSortedBag(SortedBag bag, Predicate predicate) Constructor that wraps (not copies). |
Comparator | |
static SortedBag | decorate(SortedBag bag, Predicate predicate) Factory method to create a predicated (validating) bag. |
Object | first() |
Gets the decorated sorted bag. | |
Object | last() |
protected PredicatedSortedBag(SortedBag bag, Predicate predicate)
- if bag or predicate is null
- if the bag contains invalid elementspublic Comparator comparator()
public static SortedBag decorate(SortedBag bag, Predicate predicate)
- if bag or predicate is null
- if the bag contains invalid elementspublic Object first()
protected SortedBag getSortedBag()
public Object last()
SortedBag
to validate that additions match a specified predicate. If an object cannot be added to the list, an IllegalArgumentException is thrown.