commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1003998 - /commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/FindWithinGenerator.java
Date Sun, 03 Oct 2010 16:46:42 GMT
Author: mbenson
Date: Sun Oct  3 16:46:42 2010
New Revision: 1003998

URL: http://svn.apache.org/viewvc?rev=1003998&view=rev
Log:
widen arguments

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

Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/FindWithinGenerator.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/FindWithinGenerator.java?rev=1003998&r1=1003997&r2=1003998&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/FindWithinGenerator.java
(original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/FindWithinGenerator.java
Sun Oct  3 16:46:42 2010
@@ -29,7 +29,7 @@ import org.apache.commons.functor.genera
  *
  * @version $Revision$ $Date$
  */
-public final class FindWithinGenerator<E> implements BinaryFunction<Generator<E>,
UnaryPredicate<E>, E>, Serializable {
+public final class FindWithinGenerator<E> implements BinaryFunction<Generator<?
extends E>, UnaryPredicate<? super E>, E>, Serializable {
     /**
      * Basic instance.
      */
@@ -41,13 +41,13 @@ public final class FindWithinGenerator<E
     private static class FindProcedure<T> implements UnaryProcedure<T> {
         private T found;
         private boolean wasFound;
-        private UnaryPredicate<T> pred;
+        private UnaryPredicate<? super T> pred;
 
         /**
          * Create a new FindProcedure.
          * @pred test
          */
-        public FindProcedure(UnaryPredicate<T> pred) {
+        public FindProcedure(UnaryPredicate<? super T> pred) {
             this.pred = pred;
         }
 
@@ -87,7 +87,7 @@ public final class FindWithinGenerator<E
      * @param left Generator
      * @param right UnaryPredicate
      */
-    public E evaluate(Generator<E> left, UnaryPredicate<E> right) {
+    public E evaluate(Generator<? extends E> left, UnaryPredicate<? super E>
right) {
         FindProcedure<E> findProcedure = new FindProcedure<E>(right);
         left.run(findProcedure);
         if (!findProcedure.wasFound) {



Mime
View raw message