This bag exists to provide validation for the decorated bag. It is normally created to decorate an empty bag. If an object cannot be added to the bag, an {@link IllegalArgumentException} is thrown.
One usage would be to ensure that no null entries are added to the bag.
SortedBag bag = PredicatedSortedBag.decorate(new TreeBag(), NotNullPredicate.INSTANCE);
This class is Serializable from Commons Collections 3.1. @since 3.0 @version $Id: PredicatedSortedBag.java 1479399 2013-05-05 21:46:48Z tn $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|