Author: tn
Date: Tue May  6 20:58:16 2014
New Revision: 1592882

URL: http://svn.apache.org/r1592882
Log:
[COLLECTIONS-522] Updated code example for PredicatedList. Thanks to Erik.

Modified:
    commons/proper/collections/trunk/src/changes/changes.xml
    
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/PredicatedList.java

Modified: commons/proper/collections/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/changes/changes.xml?rev=1592882&r1=1592881&r2=1592882&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/changes/changes.xml (original)
+++ commons/proper/collections/trunk/src/changes/changes.xml Tue May  6 
20:58:16 2014
@@ -22,6 +22,9 @@
   <body>
 
   <release version="4.1" date="TBD" description="">
+    <action issue="COLLECTIONS-522" dev="tn" type="fix" due-to="Erik">
+      Updated code example for "PredicatedList".
+    </action>
     <action issue="COLLECTIONS-512" dev="tn" type="fix" due-to="Cyrille Artho">
       "TransformingComparator" and "FixedOrderComparator" did not comply with
       the contract of "Object#equals".

Modified: 
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/PredicatedList.java
URL: 
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/PredicatedList.java?rev=1592882&r1=1592881&r2=1592882&view=diff
==============================================================================
--- 
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/PredicatedList.java
 (original)
+++ 
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/PredicatedList.java
 Tue May  6 20:58:16 2014
@@ -16,14 +16,14 @@
  */
 package org.apache.commons.collections4.list;
 
-import org.apache.commons.collections4.Predicate;
-import org.apache.commons.collections4.collection.PredicatedCollection;
-import org.apache.commons.collections4.iterators.AbstractListIteratorDecorator;
-
 import java.util.Collection;
 import java.util.List;
 import java.util.ListIterator;
 
+import org.apache.commons.collections4.Predicate;
+import org.apache.commons.collections4.collection.PredicatedCollection;
+import org.apache.commons.collections4.iterators.AbstractListIteratorDecorator;
+
 /**
  * Decorates another <code>List</code> to validate that all additions
  * match a specified predicate.
@@ -33,7 +33,12 @@ import java.util.ListIterator;
  * If an object cannot be added to the list, an IllegalArgumentException is 
thrown.
  * <p>
  * One usage would be to ensure that no null entries are added to the list.
- * <pre>List list = PredicatedList.decorate(new ArrayList(), 
NotNullPredicate.INSTANCE);</pre>
+ * <pre>
+ * {@code
+ * List<String> list =
+ *   PredicatedList.predicatedList(new ArrayList<String>(), 
PredicateUtils.notNullPredicate());
+ * }
+ * </pre>
  * <p>
  * This class is Serializable from Commons Collections 3.1.
  *


Reply via email to