Author: mbenson
Date: Tue Aug  3 22:28:46 2010
New Revision: 982054

URL: http://svn.apache.org/viewvc?rev=982054&view=rev
Log:
move constructor-only type parameters from class to constructor

Modified:
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundFunction.java
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundPredicate.java
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundProcedure.java
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundFunction.java
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundPredicate.java
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundProcedure.java
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundFunction.java
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundPredicate.java
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundProcedure.java
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundFunction.java
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundPredicate.java
    
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundProcedure.java
    
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundFunction.java
    
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundPredicate.java
    
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundProcedure.java
    
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundFunction.java
    
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundPredicate.java
    
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundProcedure.java

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundFunction.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundFunction.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundFunction.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundFunction.java
 Tue Aug  3 22:28:46 2010
@@ -39,87 +39,36 @@ import org.apache.commons.functor.UnaryF
  * @author Rodney Waldhoff
  */
 public final class BoundFunction<T> implements Function<T>, Serializable {
-    private class Helper<A> implements Function<T>, Serializable {
-        /** The {...@link UnaryFunction UnaryFunction} I'm wrapping. */
-        private UnaryFunction<? super A, ? extends T> function;
-
-        /** The parameter to pass to that function. */
-        private A arg = null;
-
-        private Helper(UnaryFunction<? super A, ? extends T> function, A arg) {
-            this.function = function;
-            this.arg = arg;
-        }
-
-        /**
-         * {...@inheritdoc}
-         */
-        public T evaluate() {
-            return function.evaluate(arg);
-        }
-
-        /**
-         * {...@inheritdoc}
-         */
-        @Override
-        public boolean equals(Object obj) {
-            return obj == this || obj instanceof Helper && equals((Helper<?>) 
obj);
-        }
-
-        private boolean equals(Helper<?> that) {
-            if (that != null && that.function.equals(this.function)) {
-                return that.arg == this.arg || that.arg != null && 
that.arg.equals(this.arg);
-            }
-            return false;
-        }
-
-        /**
-         * {...@inheritdoc}
-         */
-        @Override
-        public int hashCode() {
-            int result = "BoundFunction$Helper".hashCode();
-            result <<= 2;
-            result |= function.hashCode();
-            result <<= 2;
-            return arg == null ? result : result | arg.hashCode();
-        }
-
-        /**
-         * {...@inheritdoc}
-         */
-        @Override
-        public String toString() {
-            return function.toString() + "(" + arg + ")";
-        }
-    }
-
-    private Helper<?> helper;
+    private UnaryFunction<Object, ? extends T> function;
+    private Object arg;
 
     /**
-     * Create a new BoundFunction.
+     * Create a new BoundFunction instance.
+     * @param <A>
      * @param function the function to adapt
      * @param arg the constant argument to use
      */
+    @SuppressWarnings("unchecked")
     public <A> BoundFunction(UnaryFunction<? super A, ? extends T> function, A 
arg) {
         if (function == null) {
             throw new IllegalArgumentException("UnaryFunction argument was 
null");
         }
-        this.helper = new Helper<A>(function, arg);
+        this.function = (UnaryFunction<Object, ? extends T>) function;
+        this.arg = arg;
     }
 
     /**
      * {...@inheritdoc}
      */
     public T evaluate() {
-        return helper.evaluate();
+        return function.evaluate(arg);
     }
 
     /**
      * {...@inheritdoc}
      */
     public boolean equals(Object that) {
-        return that == this || (that instanceof BoundFunction && 
equals((BoundFunction<?>) that));
+        return that == this || (that instanceof BoundFunction<?> && 
equals((BoundFunction<?>) that));
     }
 
     /**
@@ -128,21 +77,31 @@ public final class BoundFunction<T> impl
      * @return boolean
      */
     public boolean equals(BoundFunction<?> that) {
-        return null != that && that.helper.equals(this.helper);
+        if (that == null) {
+            return false;
+        }
+        if (!(that.function.equals(this.function))) {
+            return false;
+        }
+        return that.arg == this.arg || that.arg != null && 
that.arg.equals(this.arg);
     }
 
     /**
      * {...@inheritdoc}
      */
     public int hashCode() {
-        return "BoundFunction".hashCode() << 8 | helper.hashCode();
+        int result = "BoundFunction".hashCode();
+        result <<= 2;
+        result |= function.hashCode();
+        result <<= 2;
+        return arg == null ? result : result | arg.hashCode();
     }
 
     /**
      * {...@inheritdoc}
      */
     public String toString() {
-        return "BoundFunction<" + helper + ">";
+        return "BoundFunction<" + function.toString() + "(" + arg + ")>";
     }
 
     /**
@@ -153,8 +112,8 @@ public final class BoundFunction<T> impl
      * argument.
      * When the given <code>UnaryFunction</code> is <code>null</code>,
      * returns <code>null</code>.
-     * @param <A>
-     * @param <T>
+     * @param <A> input type
+     * @param <T> result type
      * @param function the possibly-<code>null</code>
      *        {...@link UnaryFunction UnaryFunction} to adapt
      * @param arg the object to bind as a constant argument

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundPredicate.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundPredicate.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundPredicate.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundPredicate.java
 Tue Aug  3 22:28:46 2010
@@ -45,7 +45,8 @@ public final class BoundPredicate implem
     private Object param;
 
     /**
-     * Create a new BoundPredicate.
+     * Create a new BoundPredicate instance.
+     * @param <A> input type
      * @param predicate the predicate to adapt
      * @param arg the constant argument to use
      */
@@ -116,6 +117,7 @@ public final class BoundPredicate implem
      * When the given <code>UnaryPredicate</code> is <code>null</code>,
      * returns <code>null</code>.
      *
+     * @param <A> input type
      * @param predicate the possibly-<code>null</code>
      *        {...@link UnaryPredicate UnaryPredicate} to adapt
      * @param arg the object to bind as a constant argument

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundProcedure.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundProcedure.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundProcedure.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BoundProcedure.java
 Tue Aug  3 22:28:46 2010
@@ -45,7 +45,8 @@ public final class BoundProcedure implem
     private Object param;
 
     /**
-     * Create a new BoundProcedure.
+     * Create a new BoundProcedure instance.
+     * @param <A> arg type
      * @param procedure the procedure to adapt
      * @param arg the constant argument to use
      */
@@ -115,6 +116,7 @@ public final class BoundProcedure implem
      * When the given <code>UnaryProcedure</code> is <code>null</code>,
      * returns <code>null</code>.
      *
+     * @param <A> arg type
      * @param procedure the possibly-<code>null</code>
      *        {...@link UnaryProcedure UnaryProcedure} to adapt
      * @param arg the object to bind as a constant argument

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundFunction.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundFunction.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundFunction.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundFunction.java
 Tue Aug  3 22:28:46 2010
@@ -38,13 +38,13 @@ import org.apache.commons.functor.Functi
  * @version $Revision$ $Date$
  * @author Matt Benson
  */
-public final class FullyBoundFunction<L, R, T> implements Function<T>, 
Serializable {
+public final class FullyBoundFunction<T> implements Function<T>, Serializable {
     /** The {...@link BinaryFunction BinaryFunction} I'm wrapping. */
-    private BinaryFunction<? super L, ? super R, ? extends T> function;
+    private BinaryFunction<Object, Object, ? extends T> function;
     /** The left parameter to pass to that function. */
-    private L left;
+    private Object left;
     /** The right parameter to pass to that function. */
-    private R right;
+    private Object right;
 
     /**
      * Create a new FullyBoundFunction.
@@ -52,11 +52,12 @@ public final class FullyBoundFunction<L,
      * @param left the left side argument to use
      * @param right the right side argument to use
      */
-    public FullyBoundFunction(BinaryFunction<? super L, ? super R, ? extends 
T> function, L left, R right) {
+    @SuppressWarnings("unchecked")
+    public <L, R> FullyBoundFunction(BinaryFunction<? super L, ? super R, ? 
extends T> function, L left, R right) {
         if (function == null) {
             throw new IllegalArgumentException("BinaryFunction argument was 
null");
         }
-        this.function = function;
+        this.function = (BinaryFunction<Object, Object, T>) function;
         this.left = left;
         this.right = right;
     }
@@ -72,7 +73,7 @@ public final class FullyBoundFunction<L,
      * {...@inheritdoc}
      */
     public boolean equals(Object that) {
-        return that == this || (that instanceof FullyBoundFunction && 
equals((FullyBoundFunction<?, ?, ?>) that));
+        return that == this || (that instanceof FullyBoundFunction<?> && 
equals((FullyBoundFunction<?>) that));
     }
 
     /**
@@ -80,7 +81,7 @@ public final class FullyBoundFunction<L,
      * @param that FullyBoundFunction to test
      * @return boolean
      */
-    public boolean equals(FullyBoundFunction<?, ?, ?> that) {
+    public boolean equals(FullyBoundFunction<?> that) {
         return null != that && (null == function ? null == that.function : 
function.equals(that.function))
                 && (null == left ? null == that.left : left.equals(that.left))
                 && (null == right ? null == that.right : 
right.equals(that.right));
@@ -115,14 +116,17 @@ public final class FullyBoundFunction<L,
 
     /**
      * Adapt a BinaryFunction as a Function.
+     * @param <L> left type
+     * @param <R> right type
+     * @param <T> result type
      * @param function to adapt
      * @param left left side argument
      * @param right right side argument
      * @return FullyBoundFunction
      */
-    public static <L, R, T> FullyBoundFunction<L, R, T> bind(
+    public static <L, R, T> FullyBoundFunction<T> bind(
             BinaryFunction<? super L, ? super R, ? extends T> function, L 
left, R right) {
-        return null == function ? null : new FullyBoundFunction<L, R, 
T>(function, left, right);
+        return null == function ? null : new FullyBoundFunction<T>(function, 
left, right);
     }
 
 }

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundPredicate.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundPredicate.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundPredicate.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundPredicate.java
 Tue Aug  3 22:28:46 2010
@@ -20,7 +20,6 @@ import java.io.Serializable;
 
 import org.apache.commons.functor.BinaryPredicate;
 import org.apache.commons.functor.Predicate;
-import org.apache.commons.functor.UnaryPredicate;
 
 /**
  * Adapts a
@@ -39,26 +38,29 @@ import org.apache.commons.functor.UnaryP
  * @version $Revision$ $Date$
  * @author Matt Benson
  */
-public final class FullyBoundPredicate<L, R> implements Predicate, 
Serializable {
+public final class FullyBoundPredicate implements Predicate, Serializable {
 
     /** The {...@link BinaryPredicate BinaryPredicate} I'm wrapping. */
-    private BinaryPredicate<? super L, ? super R> predicate;
+    private BinaryPredicate<Object, Object> predicate;
     /** The left parameter to pass to that predicate. */
-    private L left;
+    private Object left;
     /** The right parameter to pass to that predicate. */
-    private R right;
+    private Object right;
 
     /**
-     * Create a new FullyBoundPredicate.
+     * Create a new FullyBoundPredicate instance.
+     * @param <L> left type
+     * @param <R> right type
      * @param predicate the predicate to adapt
      * @param left the left argument to use
      * @param right the right argument to use
      */
-    public FullyBoundPredicate(BinaryPredicate<? super L, ? super R> 
predicate, L left, R right) {
+    @SuppressWarnings("unchecked")
+    public <L, R> FullyBoundPredicate(BinaryPredicate<? super L, ? super R> 
predicate, L left, R right) {
         if (predicate == null) {
             throw new IllegalArgumentException("BinaryPredicate argument was 
null");
         }
-        this.predicate = predicate;
+        this.predicate = (BinaryPredicate<Object, Object>) predicate;
         this.left = left;
         this.right = right;
     }
@@ -74,7 +76,7 @@ public final class FullyBoundPredicate<L
      * {...@inheritdoc}
      */
     public boolean equals(Object that) {
-        return that == this || (that instanceof FullyBoundPredicate && 
equals((FullyBoundPredicate<?, ?>) that));
+        return that == this || (that instanceof FullyBoundPredicate && 
equals((FullyBoundPredicate) that));
     }
 
     /**
@@ -82,7 +84,7 @@ public final class FullyBoundPredicate<L
      * @param that FullyBoundPredicate to test
      * @return boolean
      */
-    public boolean equals(FullyBoundPredicate<?, ?> that) {
+    public boolean equals(FullyBoundPredicate that) {
         return null != that && (null == predicate ? null == that.predicate : 
predicate.equals(that.predicate))
                 && (null == left ? null == that.left : left.equals(that.left))
                 && (null == right ? null == that.right : 
right.equals(that.right));
@@ -118,11 +120,14 @@ public final class FullyBoundPredicate<L
     /**
      * Adapt a BinaryPredicate to the Predicate interface.
      * @param predicate to adapt
+     * @param <L> left type
+     * @param <R> right type
      * @param left L argument to always send as the left operand to the 
wrapped function
      * @param right R argument to always send as the right operand to the 
wrapped function
      * @return FullyBoundPredicate
      */
-    public static <L, R> FullyBoundPredicate<L, R> bind(BinaryPredicate<? 
super L, ? super R> predicate, L left, R right) {
-        return null == predicate ? null : new FullyBoundPredicate<L, 
R>(predicate, left, right);
+    public static <L, R> FullyBoundPredicate bind(
+            BinaryPredicate<? super L, ? super R> predicate, L left, R right) {
+        return null == predicate ? null : new FullyBoundPredicate(predicate, 
left, right);
     }
 }

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundProcedure.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundProcedure.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundProcedure.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FullyBoundProcedure.java
 Tue Aug  3 22:28:46 2010
@@ -38,25 +38,28 @@ import org.apache.commons.functor.Proced
  * @version $Revision$ $Date$
  * @author Matt Benson
  */
-public final class FullyBoundProcedure<L, R> implements Procedure, 
Serializable {
+public final class FullyBoundProcedure implements Procedure, Serializable {
     /** The {...@link BinaryProcedure BinaryProcedure} I'm wrapping. */
-    private BinaryProcedure<? super L, ? super R> procedure;
+    private BinaryProcedure<Object, Object> procedure;
     /** The left parameter to pass to that procedure. */
-    private L left;
+    private Object left;
     /** The right parameter to pass to that procedure. */
-    private R right;
+    private Object right;
 
     /**
-     * Create a new FullyBoundProcedure.
+     * Create a new FullyBoundProcedure instance.
+     * @param <L> left type
+     * @param <R> right type
      * @param procedure the procedure to adapt
      * @param left the left argument to use
      * @param right the right argument to use
      */
-    public FullyBoundProcedure(BinaryProcedure<? super L, ? super R> 
procedure, L left, R right) {
+    @SuppressWarnings("unchecked")
+    public <L, R> FullyBoundProcedure(BinaryProcedure<? super L, ? super R> 
procedure, L left, R right) {
         if (procedure == null) {
             throw new IllegalArgumentException("BinaryProcedure argument was 
null");
         }
-        this.procedure = procedure;
+        this.procedure = (BinaryProcedure<Object, Object>) procedure;
         this.left = left;
         this.right = right;
     }
@@ -72,7 +75,7 @@ public final class FullyBoundProcedure<L
      * {...@inheritdoc}
      */
     public boolean equals(Object that) {
-        return that == this || (that instanceof FullyBoundProcedure && 
equals((FullyBoundProcedure<?, ?>) that));
+        return that == this || (that instanceof FullyBoundProcedure && 
equals((FullyBoundProcedure) that));
     }
 
     /**
@@ -80,7 +83,7 @@ public final class FullyBoundProcedure<L
      * @param that FullyBoundProcedure to test
      * @return boolean
      */
-    public boolean equals(FullyBoundProcedure<?, ?> that) {
+    public boolean equals(FullyBoundProcedure that) {
         return null != that && (null == procedure ? null == that.procedure : 
procedure.equals(that.procedure))
                 && (null == left ? null == that.left : left.equals(that.left))
                 && (null == right ? null == that.right : 
right.equals(that.right));
@@ -90,7 +93,7 @@ public final class FullyBoundProcedure<L
      * {...@inheritdoc}
      */
     public int hashCode() {
-        int hash = "LeftBoundProcedure".hashCode();
+        int hash = "FullyBoundProcedure".hashCode();
         if (null != procedure) {
             hash <<= 2;
             hash ^= procedure.hashCode();
@@ -115,13 +118,15 @@ public final class FullyBoundProcedure<L
 
     /**
      * Adapt a BinaryProcedure to the Procedure interface.
+     * @param <L> left type
+     * @param <R> right type
      * @param procedure to adapt
      * @param left left side argument
      * @param right right side argument
      * @return FullyBoundProcedure
      */
-    public static <L, R> FullyBoundProcedure<L, R> bind(BinaryProcedure<? 
super L, ? super R> procedure, L left, R right) {
-        return null == procedure ? null : new FullyBoundProcedure<L, 
R>(procedure, left, right);
+    public static <L, R> FullyBoundProcedure bind(BinaryProcedure<? super L, ? 
super R> procedure, L left, R right) {
+        return null == procedure ? null : new FullyBoundProcedure(procedure, 
left, right);
     }
 
 }

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundFunction.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundFunction.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundFunction.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundFunction.java
 Tue Aug  3 22:28:46 2010
@@ -38,29 +38,31 @@ import org.apache.commons.functor.UnaryF
  * @version $Revision$ $Date$
  * @author Rodney Waldhoff
  */
-public final class LeftBoundFunction<L, R, T> implements UnaryFunction<R, T>, 
Serializable {
+public final class LeftBoundFunction<A, T> implements UnaryFunction<A, T>, 
Serializable {
     /** The {...@link BinaryFunction BinaryFunction} I'm wrapping. */
-    private BinaryFunction<? super L, ? super R, ? extends T> function;
+    private BinaryFunction<Object, ? super A, ? extends T> function;
     /** The parameter to pass to that function. */
-    private L param = null;
+    private Object param = null;
 
     /**
-     * Create a new LeftBoundFunction.
+     * Create a new LeftBoundFunction instance.
+     * @param <L> bound arg type
      * @param function the function to adapt
      * @param arg the constant argument to use
      */
-    public LeftBoundFunction(BinaryFunction<? super L, ? super R, ? extends T> 
function, L arg) {
+    @SuppressWarnings("unchecked")
+    public <L> LeftBoundFunction(BinaryFunction<? super L, ? super A, ? 
extends T> function, L arg) {
         if (function == null) {
             throw new IllegalArgumentException("BinaryFunction argument was 
null");
         }
-        this.function = function;
+        this.function = (BinaryFunction<Object, ? super A, ? extends T>) 
function;
         this.param = arg;
     }
 
     /**
      * {...@inheritdoc}
      */
-    public T evaluate(R obj) {
+    public T evaluate(A obj) {
         return function.evaluate(param, obj);
     }
 
@@ -68,7 +70,7 @@ public final class LeftBoundFunction<L, 
      * {...@inheritdoc}
      */
     public boolean equals(Object that) {
-        return that == this || (that instanceof LeftBoundFunction && 
equals((LeftBoundFunction<?, ?, ?>) that));
+        return that == this || (that instanceof LeftBoundFunction<?, ?> && 
equals((LeftBoundFunction<?, ?>) that));
     }
 
     /**
@@ -76,7 +78,7 @@ public final class LeftBoundFunction<L, 
      * @param that LeftBoundFunction to test
      * @return boolean
      */
-    public boolean equals(LeftBoundFunction<?, ?, ?> that) {
+    public boolean equals(LeftBoundFunction<?, ?> that) {
         return null != that
                 && (null == function ? null == that.function : 
function.equals(that.function))
                 && (null == param ? null == that.param : 
param.equals(that.param));
@@ -107,12 +109,16 @@ public final class LeftBoundFunction<L, 
 
     /**
      * Adapt a BinaryFunction as a UnaryFunction.
+     * @param <L> left type
+     * @param <R> right type
+     * @param <T> result type
      * @param function to adapt
      * @param arg left side argument
      * @return LeftBoundFunction
      */
-    public static <L, R, T> LeftBoundFunction<L, R, T> bind(BinaryFunction<? 
super L, ? super R, ? extends T> function, L arg) {
-        return null == function ? null : new LeftBoundFunction<L, R, 
T>(function, arg);
+    public static <L, R, T> LeftBoundFunction<R, T> bind(
+            BinaryFunction<? super L, ? super R, ? extends T> function, L arg) 
{
+        return null == function ? null : new LeftBoundFunction<R, T>(function, 
arg);
     }
 
 }

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundPredicate.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundPredicate.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundPredicate.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundPredicate.java
 Tue Aug  3 22:28:46 2010
@@ -38,30 +38,31 @@ import org.apache.commons.functor.UnaryP
  * @version $Revision$ $Date$
  * @author Rodney Waldhoff
  */
-public final class LeftBoundPredicate<L, R> implements UnaryPredicate<R>, 
Serializable {
+public final class LeftBoundPredicate<A> implements UnaryPredicate<A>, 
Serializable {
 
     /** The {...@link BinaryPredicate BinaryPredicate} I'm wrapping. */
-    private BinaryPredicate<? super L, ? super R> predicate;
+    private BinaryPredicate<Object, ? super A> predicate;
     /** The parameter to pass to that predicate. */
-    private L param;
+    private Object param;
 
     /**
      * Create a new LeftBoundPredicate.
      * @param predicate the predicate to adapt
      * @param arg the constant argument to use
      */
-    public LeftBoundPredicate(BinaryPredicate<? super L, ? super R> predicate, 
L arg) {
+    @SuppressWarnings("unchecked")
+    public <L> LeftBoundPredicate(BinaryPredicate<? super L, ? super A> 
predicate, L arg) {
         if (predicate == null) {
             throw new IllegalArgumentException("BinaryPredicate argument was 
null");
         }
-        this.predicate = predicate;
+        this.predicate = (BinaryPredicate<Object, ? super A>) predicate;
         this.param = arg;
     }
 
     /**
      * {...@inheritdoc}
      */
-    public boolean test(R obj) {
+    public boolean test(A obj) {
         return predicate.test(param, obj);
     }
 
@@ -69,7 +70,7 @@ public final class LeftBoundPredicate<L,
      * {...@inheritdoc}
      */
     public boolean equals(Object that) {
-        return that == this || (that instanceof LeftBoundPredicate && 
equals((LeftBoundPredicate<?, ?>) that));
+        return that == this || (that instanceof LeftBoundPredicate<?> && 
equals((LeftBoundPredicate<?>) that));
     }
 
     /**
@@ -77,7 +78,7 @@ public final class LeftBoundPredicate<L,
      * @param that LeftBoundPredicate to test
      * @return boolean
      */
-    public boolean equals(LeftBoundPredicate<?, ?> that) {
+    public boolean equals(LeftBoundPredicate<?> that) {
         return null != that
                 && (null == predicate ? null == that.predicate : 
predicate.equals(that.predicate))
                 && (null == param ? null == that.param : 
param.equals(that.param));
@@ -112,7 +113,7 @@ public final class LeftBoundPredicate<L,
      * @param arg Object argument to always send as the left operand to the 
wrapped function
      * @return LeftBoundPredicate
      */
-    public static <L, R> LeftBoundPredicate<L, R> bind(BinaryPredicate<? super 
L, ? super R> predicate, L arg) {
-        return null == predicate ? null : new LeftBoundPredicate<L, 
R>(predicate, arg);
+    public static <L, R> LeftBoundPredicate<R> bind(BinaryPredicate<? super L, 
? super R> predicate, L arg) {
+        return null == predicate ? null : new LeftBoundPredicate<R>(predicate, 
arg);
     }
 }

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundProcedure.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundProcedure.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundProcedure.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/LeftBoundProcedure.java
 Tue Aug  3 22:28:46 2010
@@ -38,29 +38,30 @@ import org.apache.commons.functor.UnaryP
  * @version $Revision$ $Date$
  * @author Rodney Waldhoff
  */
-public final class LeftBoundProcedure<L, R> implements UnaryProcedure<R>, 
Serializable {
+public final class LeftBoundProcedure<A> implements UnaryProcedure<A>, 
Serializable {
     /** The {...@link BinaryProcedure BinaryProcedure} I'm wrapping. */
-    private BinaryProcedure<? super L, ? super R> procedure;
+    private BinaryProcedure<Object, ? super A> procedure;
     /** The parameter to pass to that procedure. */
-    private L param;
+    private Object param;
 
     /**
      * Create a new LeftBoundProcedure.
      * @param procedure the procedure to adapt
      * @param arg the constant argument to use
      */
-    public LeftBoundProcedure(BinaryProcedure<? super L, ? super R> procedure, 
L arg) {
+    @SuppressWarnings("unchecked")
+    public <L> LeftBoundProcedure(BinaryProcedure<? super L, ? super A> 
procedure, L arg) {
         if (procedure == null) {
             throw new IllegalArgumentException("BinaryProcedure argument was 
null");
         }
-        this.procedure = procedure;
+        this.procedure = (BinaryProcedure<Object, ? super A>) procedure;
         this.param = arg;
     }
 
     /**
      * {...@inheritdoc}
      */
-    public void run(R obj) {
+    public void run(A obj) {
         procedure.run(param, obj);
     }
 
@@ -68,7 +69,7 @@ public final class LeftBoundProcedure<L,
      * {...@inheritdoc}
      */
     public boolean equals(Object that) {
-        return that == this || (that instanceof LeftBoundProcedure && 
equals((LeftBoundProcedure<?, ?>) that));
+        return that == this || (that instanceof LeftBoundProcedure<?> && 
equals((LeftBoundProcedure<?>) that));
     }
 
     /**
@@ -76,11 +77,10 @@ public final class LeftBoundProcedure<L,
      * @param that LeftBoundProcedure to test
      * @return boolean
      */
-    public boolean equals(LeftBoundProcedure<?, ?> that) {
+    public boolean equals(LeftBoundProcedure<?> that) {
         return null != that
                 && (null == procedure ? null == that.procedure : 
procedure.equals(that.procedure))
                 && (null == param ? null == that.param : 
param.equals(that.param));
-
     }
 
     /**
@@ -108,12 +108,14 @@ public final class LeftBoundProcedure<L,
 
     /**
      * Get a UnaryProcedure from <code>procedure</code>.
+     * @param <L> left type
+     * @param <R> right type
      * @param procedure to adapt
      * @param arg left side argument
-     * @return LeftBoundProcedure
+     * @return LeftBoundProcedure<R>
      */
-    public static <L, R> LeftBoundProcedure<L, R> bind(BinaryProcedure<? super 
L, ? super R> procedure, L arg) {
-        return null == procedure ? null : new LeftBoundProcedure<L, 
R>(procedure, arg);
+    public static <L, R> LeftBoundProcedure<R> bind(BinaryProcedure<? super L, 
? super R> procedure, L arg) {
+        return null == procedure ? null : new LeftBoundProcedure<R>(procedure, 
arg);
     }
 
 }

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundFunction.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundFunction.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundFunction.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundFunction.java
 Tue Aug  3 22:28:46 2010
@@ -67,7 +67,7 @@ public final class RightBoundFunction<L,
      * {...@inheritdoc}
      */
     public boolean equals(Object that) {
-        return that == this || (that instanceof RightBoundFunction && 
equals((RightBoundFunction<?, ?, ?>) that));
+        return that == this || (that instanceof RightBoundFunction<?, ?, ?> && 
equals((RightBoundFunction<?, ?, ?>) that));
     }
 
     /**

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundPredicate.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundPredicate.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundPredicate.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundPredicate.java
 Tue Aug  3 22:28:46 2010
@@ -68,7 +68,7 @@ public final class RightBoundPredicate<L
      * {...@inheritdoc}
      */
     public boolean equals(Object that) {
-        return that == this || (that instanceof RightBoundPredicate && 
equals((RightBoundPredicate<?, ?>) that));
+        return that == this || (that instanceof RightBoundPredicate<?, ?> && 
equals((RightBoundPredicate<?, ?>) that));
     }
 
     /**

Modified: 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundProcedure.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundProcedure.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundProcedure.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/adapter/RightBoundProcedure.java
 Tue Aug  3 22:28:46 2010
@@ -68,7 +68,7 @@ public final class RightBoundProcedure<L
      * {...@inheritdoc}
      */
     public boolean equals(Object that) {
-        return that == this || (that instanceof RightBoundProcedure && 
equals((RightBoundProcedure<?, ?>) that));
+        return that == this || (that instanceof RightBoundProcedure<?, ?> && 
equals((RightBoundProcedure<?, ?>) that));
     }
 
     /**

Modified: 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundFunction.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundFunction.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundFunction.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundFunction.java
 Tue Aug  3 22:28:46 2010
@@ -46,7 +46,7 @@ public class TestFullyBoundFunction exte
     // ------------------------------------------------------------------------
 
     protected Object makeFunctor() {
-        return new FullyBoundFunction<Object, Object, 
Object>(RightIdentity.FUNCTION, null, "xyzzy");
+        return new FullyBoundFunction<Object>(RightIdentity.FUNCTION, null, 
"xyzzy");
     }
 
     // Lifecycle
@@ -64,17 +64,17 @@ public class TestFullyBoundFunction exte
     // ------------------------------------------------------------------------
 
     public void testEvaluate() throws Exception {
-        Function<Object> f = new FullyBoundFunction<String, Object, 
Object>(RightIdentity.FUNCTION, null, "foo");
+        Function<Object> f = new 
FullyBoundFunction<Object>(RightIdentity.FUNCTION, null, "foo");
         assertEquals("foo", f.evaluate());
     }
 
     public void testEquals() throws Exception {
-        Function<Object> f = new FullyBoundFunction<Object, Object, 
Object>(RightIdentity.FUNCTION, null, "xyzzy");
+        Function<Object> f = new 
FullyBoundFunction<Object>(RightIdentity.FUNCTION, null, "xyzzy");
         assertEquals(f, f);
-        assertObjectsAreEqual(f, new FullyBoundFunction<Object, Object, 
Object>(RightIdentity.FUNCTION, null, "xyzzy"));
+        assertObjectsAreEqual(f, new 
FullyBoundFunction<Object>(RightIdentity.FUNCTION, null, "xyzzy"));
         assertObjectsAreNotEqual(f, Constant.of("xyzzy"));
-        assertObjectsAreNotEqual(f, new FullyBoundFunction<Object, Object, 
Object>(LeftIdentity.FUNCTION, null, "xyzzy"));
-        assertObjectsAreNotEqual(f, new FullyBoundFunction<Object, Object, 
Object>(RightIdentity.FUNCTION, null, "bar"));
+        assertObjectsAreNotEqual(f, new 
FullyBoundFunction<Object>(LeftIdentity.FUNCTION, null, "xyzzy"));
+        assertObjectsAreNotEqual(f, new 
FullyBoundFunction<Object>(RightIdentity.FUNCTION, null, "bar"));
     }
 
     public void testAdaptNull() throws Exception {

Modified: 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundPredicate.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundPredicate.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundPredicate.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundPredicate.java
 Tue Aug  3 22:28:46 2010
@@ -45,7 +45,7 @@ public class TestFullyBoundPredicate ext
     // ------------------------------------------------------------------------
 
     protected Object makeFunctor() {
-        return new FullyBoundPredicate<Object, Object>(Constant.TRUE, null, 
"xyzzy");
+        return new FullyBoundPredicate(Constant.TRUE, null, "xyzzy");
     }
 
     // Lifecycle
@@ -63,19 +63,20 @@ public class TestFullyBoundPredicate ext
     // ------------------------------------------------------------------------
 
     public void testTest() throws Exception {
-        Predicate p = new FullyBoundPredicate<Object, Boolean>(
-                new BinaryFunctionBinaryPredicate<Object, 
Boolean>(RightIdentity.<Object, Boolean> function()), "foo", Boolean.TRUE);
+        Predicate p = new FullyBoundPredicate(
+                new BinaryFunctionBinaryPredicate<Object, 
Boolean>(RightIdentity.<Object, Boolean> function()), "foo",
+                Boolean.TRUE);
         assertEquals(true, p.test());
     }
 
     public void testEquals() throws Exception {
-        Predicate p = new FullyBoundPredicate<Object, Boolean>(Constant.TRUE, 
"xyzzy", null);
+        Predicate p = new FullyBoundPredicate(Constant.TRUE, "xyzzy", null);
         assertEquals(p, p);
-        assertObjectsAreEqual(p, new FullyBoundPredicate<Object, 
Boolean>(Constant.TRUE, "xyzzy", null));
+        assertObjectsAreEqual(p, new FullyBoundPredicate(Constant.TRUE, 
"xyzzy", null));
         assertObjectsAreNotEqual(p, Constant.TRUE);
-        assertObjectsAreNotEqual(p, new FullyBoundPredicate<Object, 
Boolean>(Constant.FALSE, "xyzzy", null));
-        assertObjectsAreNotEqual(p, new FullyBoundPredicate<Object, 
Boolean>(Constant.TRUE, "foo", null));
-        assertObjectsAreNotEqual(p, new FullyBoundPredicate<Object, 
String>(Constant.TRUE, null, "xyzzy"));
+        assertObjectsAreNotEqual(p, new FullyBoundPredicate(Constant.FALSE, 
"xyzzy", null));
+        assertObjectsAreNotEqual(p, new FullyBoundPredicate(Constant.TRUE, 
"foo", null));
+        assertObjectsAreNotEqual(p, new FullyBoundPredicate(Constant.TRUE, 
null, "xyzzy"));
     }
 
     public void testAdaptNull() throws Exception {

Modified: 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundProcedure.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundProcedure.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundProcedure.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestFullyBoundProcedure.java
 Tue Aug  3 22:28:46 2010
@@ -45,7 +45,7 @@ public class TestFullyBoundProcedure ext
     // ------------------------------------------------------------------------
 
     protected Object makeFunctor() {
-        return new FullyBoundProcedure<Object, Object>(NoOp.INSTANCE, "xyzzy", 
null);
+        return new FullyBoundProcedure(NoOp.INSTANCE, "xyzzy", null);
     }
 
     // Lifecycle
@@ -63,20 +63,20 @@ public class TestFullyBoundProcedure ext
     // ------------------------------------------------------------------------
 
     public void testRun() throws Exception {
-        Procedure p = new FullyBoundProcedure<Object, Object>(new 
BinaryFunctionBinaryProcedure<Object, Object>(
+        Procedure p = new FullyBoundProcedure(new 
BinaryFunctionBinaryProcedure<Object, Object>(
                 RightIdentity.FUNCTION), "foo", null);
         p.run();
     }
 
     public void testEquals() throws Exception {
-        Procedure f = new FullyBoundProcedure<Object, Object>(NoOp.INSTANCE, 
"xyzzy", null);
+        Procedure f = new FullyBoundProcedure(NoOp.INSTANCE, "xyzzy", null);
         assertEquals(f, f);
-        assertObjectsAreEqual(f, new FullyBoundProcedure<Object, 
Object>(NoOp.INSTANCE, "xyzzy", null));
+        assertObjectsAreEqual(f, new FullyBoundProcedure(NoOp.INSTANCE, 
"xyzzy", null));
         assertObjectsAreNotEqual(f, new NoOp());
-        assertObjectsAreNotEqual(f, new FullyBoundProcedure<Object, Object>(
+        assertObjectsAreNotEqual(f, new FullyBoundProcedure(
                 new BinaryFunctionBinaryProcedure<Object, 
Object>(RightIdentity.FUNCTION), "xyzzy", null));
-        assertObjectsAreNotEqual(f, new FullyBoundProcedure<Object, 
Object>(NoOp.INSTANCE, "foo", null));
-        assertObjectsAreNotEqual(f, new FullyBoundProcedure<Object, 
Object>(NoOp.INSTANCE, null, null));
+        assertObjectsAreNotEqual(f, new FullyBoundProcedure(NoOp.INSTANCE, 
"foo", null));
+        assertObjectsAreNotEqual(f, new FullyBoundProcedure(NoOp.INSTANCE, 
null, null));
     }
 
     public void testAdaptNull() throws Exception {

Modified: 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundFunction.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundFunction.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundFunction.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundFunction.java
 Tue Aug  3 22:28:46 2010
@@ -46,7 +46,7 @@ public class TestLeftBoundFunction exten
     // ------------------------------------------------------------------------
 
     protected Object makeFunctor() {
-        return new LeftBoundFunction<Object, Object, 
Object>(RightIdentity.FUNCTION,"xyzzy");
+        return new LeftBoundFunction<Object, 
Object>(RightIdentity.FUNCTION,"xyzzy");
     }
 
     // Lifecycle
@@ -64,17 +64,17 @@ public class TestLeftBoundFunction exten
     // ------------------------------------------------------------------------
 
     public void testEvaluate() throws Exception {
-        UnaryFunction<Object, Object> f = new LeftBoundFunction<String, 
Object, Object>(RightIdentity.FUNCTION,"foo");
+        UnaryFunction<Object, Object> f = new LeftBoundFunction<Object, 
Object>(RightIdentity.FUNCTION,"foo");
         assertEquals("xyzzy",f.evaluate("xyzzy"));
     }
 
     public void testEquals() throws Exception {
-        UnaryFunction<Object, Object> f = new LeftBoundFunction<Object, 
Object, Object>(RightIdentity.FUNCTION,"xyzzy");
+        UnaryFunction<Object, Object> f = new LeftBoundFunction<Object, 
Object>(RightIdentity.FUNCTION,"xyzzy");
         assertEquals(f,f);
-        assertObjectsAreEqual(f,new LeftBoundFunction<Object, Object, 
Object>(RightIdentity.FUNCTION,"xyzzy"));
+        assertObjectsAreEqual(f,new LeftBoundFunction<Object, 
Object>(RightIdentity.FUNCTION,"xyzzy"));
         assertObjectsAreNotEqual(f,Constant.of("xyzzy"));
-        assertObjectsAreNotEqual(f,new LeftBoundFunction<Object, Object, 
Object>(LeftIdentity.FUNCTION,"xyzzy"));
-        assertObjectsAreNotEqual(f,new LeftBoundFunction<Object, Object, 
Object>(RightIdentity.FUNCTION,"bar"));
+        assertObjectsAreNotEqual(f,new LeftBoundFunction<Object, 
Object>(LeftIdentity.FUNCTION,"xyzzy"));
+        assertObjectsAreNotEqual(f,new LeftBoundFunction<Object, 
Object>(RightIdentity.FUNCTION,"bar"));
     }
 
     public void testAdaptNull() throws Exception {

Modified: 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundPredicate.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundPredicate.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundPredicate.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundPredicate.java
 Tue Aug  3 22:28:46 2010
@@ -45,7 +45,7 @@ public class TestLeftBoundPredicate exte
     // ------------------------------------------------------------------------
 
     protected Object makeFunctor() {
-        return new LeftBoundPredicate<Object, Object>(Constant.TRUE,"xyzzy");
+        return new LeftBoundPredicate<Object>(Constant.TRUE,"xyzzy");
     }
 
     // Lifecycle
@@ -63,20 +63,20 @@ public class TestLeftBoundPredicate exte
     // ------------------------------------------------------------------------
 
     public void testTest() throws Exception {
-        UnaryPredicate<Boolean> p = new LeftBoundPredicate<Object, Boolean>(
+        UnaryPredicate<Boolean> p = new LeftBoundPredicate<Boolean>(
                 new BinaryFunctionBinaryPredicate<Object, 
Boolean>(RightIdentity.<Object, Boolean> function()), "foo");
         assertEquals(true,p.test(Boolean.TRUE));
         assertEquals(false,p.test(Boolean.FALSE));
     }
 
     public void testEquals() throws Exception {
-        UnaryPredicate<Boolean> p = new LeftBoundPredicate<Object, 
Boolean>(Constant.TRUE,"xyzzy");
+        UnaryPredicate<Boolean> p = new 
LeftBoundPredicate<Boolean>(Constant.TRUE,"xyzzy");
         assertEquals(p,p);
-        assertObjectsAreEqual(p,new LeftBoundPredicate<Object, 
Boolean>(Constant.TRUE,"xyzzy"));
+        assertObjectsAreEqual(p,new 
LeftBoundPredicate<Boolean>(Constant.TRUE,"xyzzy"));
         assertObjectsAreNotEqual(p,Constant.TRUE);
-        assertObjectsAreNotEqual(p,new LeftBoundPredicate<Object, 
Boolean>(Constant.FALSE,"xyzzy"));
-        assertObjectsAreNotEqual(p,new LeftBoundPredicate<Object, 
Boolean>(Constant.TRUE,"foo"));
-        assertObjectsAreNotEqual(p,new LeftBoundPredicate<Object, 
Boolean>(Constant.TRUE,null));
+        assertObjectsAreNotEqual(p,new 
LeftBoundPredicate<Boolean>(Constant.FALSE,"xyzzy"));
+        assertObjectsAreNotEqual(p,new 
LeftBoundPredicate<Boolean>(Constant.TRUE,"foo"));
+        assertObjectsAreNotEqual(p,new 
LeftBoundPredicate<Boolean>(Constant.TRUE,null));
     }
 
     public void testAdaptNull() throws Exception {

Modified: 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundProcedure.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundProcedure.java?rev=982054&r1=982053&r2=982054&view=diff
==============================================================================
--- 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundProcedure.java
 (original)
+++ 
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestLeftBoundProcedure.java
 Tue Aug  3 22:28:46 2010
@@ -45,7 +45,7 @@ public class TestLeftBoundProcedure exte
     // ------------------------------------------------------------------------
 
     protected Object makeFunctor() {
-        return new LeftBoundProcedure<Object, Object>(NoOp.INSTANCE,"xyzzy");
+        return new LeftBoundProcedure<Object>(NoOp.INSTANCE,"xyzzy");
     }
 
     // Lifecycle
@@ -63,21 +63,21 @@ public class TestLeftBoundProcedure exte
     // ------------------------------------------------------------------------
 
     public void testRun() throws Exception {
-        UnaryProcedure<Object> p = new LeftBoundProcedure<Object, Object>(
+        UnaryProcedure<Object> p = new LeftBoundProcedure<Object>(
                 new BinaryFunctionBinaryProcedure<Object, 
Object>(RightIdentity.FUNCTION), "foo");
         p.run(Boolean.TRUE);
         p.run(Boolean.FALSE);
     }
 
     public void testEquals() throws Exception {
-        UnaryProcedure<Object> f = new LeftBoundProcedure<Object, 
Object>(NoOp.INSTANCE, "xyzzy");
+        UnaryProcedure<Object> f = new 
LeftBoundProcedure<Object>(NoOp.INSTANCE, "xyzzy");
         assertEquals(f, f);
-        assertObjectsAreEqual(f, new LeftBoundProcedure<Object, 
Object>(NoOp.INSTANCE, "xyzzy"));
+        assertObjectsAreEqual(f, new LeftBoundProcedure<Object>(NoOp.INSTANCE, 
"xyzzy"));
         assertObjectsAreNotEqual(f, new NoOp());
-        assertObjectsAreNotEqual(f, new LeftBoundProcedure<Object, Object>(
+        assertObjectsAreNotEqual(f, new LeftBoundProcedure<Object>(
                 new BinaryFunctionBinaryProcedure<Object, 
Object>(RightIdentity.FUNCTION), "xyzzy"));
-        assertObjectsAreNotEqual(f, new LeftBoundProcedure<Object, 
Object>(NoOp.INSTANCE, "foo"));
-        assertObjectsAreNotEqual(f, new LeftBoundProcedure<Object, 
Object>(NoOp.INSTANCE, null));
+        assertObjectsAreNotEqual(f, new 
LeftBoundProcedure<Object>(NoOp.INSTANCE, "foo"));
+        assertObjectsAreNotEqual(f, new 
LeftBoundProcedure<Object>(NoOp.INSTANCE, null));
     }
 
     public void testAdaptNull() throws Exception {


Reply via email to