commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r940503 - in /commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm: RemoveMatching.java RetainMatching.java
Date Mon, 03 May 2010 16:24:16 GMT
Author: mbenson
Date: Mon May  3 16:24:16 2010
New Revision: 940503

URL: http://svn.apache.org/viewvc?rev=940503&view=rev
Log:
open up generic matching

Modified:
    commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/RemoveMatching.java
    commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/RetainMatching.java

Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/RemoveMatching.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/RemoveMatching.java?rev=940503&r1=940502&r2=940503&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/RemoveMatching.java
(original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/RemoveMatching.java
Mon May  3 16:24:16 2010
@@ -27,7 +27,7 @@ import org.apache.commons.functor.UnaryP
  *
  * @version $Revision$ $Date$
  */
-public final class RemoveMatching<T> implements BinaryProcedure<Iterator<T>,
UnaryPredicate<? super T>>, Serializable {
+public final class RemoveMatching<T> implements BinaryProcedure<Iterator<? extends
T>, UnaryPredicate<? super T>>, Serializable {
     private static final RemoveMatching<Object> INSTANCE = new RemoveMatching<Object>();
 
     /**
@@ -35,7 +35,7 @@ public final class RemoveMatching<T> imp
      * @param left {@link Iterator}
      * @param right {@link UnaryPredicate}
      */
-    public void run(Iterator<T> left, UnaryPredicate<? super T> right) {
+    public void run(Iterator<? extends T> left, UnaryPredicate<? super T> right)
{
         while (left.hasNext()) {
             if (right.test(left.next())) {
                 left.remove();

Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/RetainMatching.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/RetainMatching.java?rev=940503&r1=940502&r2=940503&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/RetainMatching.java
(original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/RetainMatching.java
Mon May  3 16:24:16 2010
@@ -28,7 +28,7 @@ import org.apache.commons.functor.core.c
  *
  * @version $Revision$ $Date$
  */
-public final class RetainMatching<T> implements BinaryProcedure<Iterator<T>,
UnaryPredicate<? super T>>, Serializable {
+public final class RetainMatching<T> implements BinaryProcedure<Iterator<? extends
T>, UnaryPredicate<? super T>>, Serializable {
     private static final RetainMatching<Object> INSTANCE = new RetainMatching<Object>();
     
     private RemoveMatching<T> removeMatching = new RemoveMatching<T>();
@@ -38,7 +38,7 @@ public final class RetainMatching<T> imp
      * @param left {@link Iterator}
      * @param right {@link UnaryPredicate}
      */
-    public void run(Iterator<T> left, UnaryPredicate<? super T> right) {
+    public void run(Iterator<? extends T> left, UnaryPredicate<? super T> right)
{
         removeMatching.run(left, UnaryNot.not(right));
     }
 



Mime
View raw message