This collection exists to provide validation for the decorated collection. It is normally created to decorate an empty collection. If an object cannot be added to the collection, an IllegalArgumentException is thrown.
One usage would be to ensure that no null entries are added to the collection.
Collection coll = PredicatedCollection.decorate(new ArrayList(), NotNullPredicate.INSTANCE);
This class is Serializable from Commons Collections 3.1. @param < E> the type of the elements in the collection @since 3.0 @version $Id: PredicatedCollection.java 1479401 2013-05-05 21:51:47Z tn $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|