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