SortedSet
to validate that all additions match a specified predicate. This set exists to provide validation for the decorated set. It is normally created to decorate an empty set. If an object cannot be added to the set, an IllegalArgumentException is thrown.
One usage would be to ensure that no null entries are added to the set.
SortedSet set = PredicatedSortedSet.decorate(new TreeSet(), NotNullPredicate.INSTANCE);
This class is Serializable from Commons Collections 3.1. @since 3.0 @version $Id: PredicatedSortedSet.java 1479406 2013-05-05 22:02:01Z tn $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|