You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mb...@apache.org on 2010/09/15 23:29:24 UTC
svn commit: r997516 - in /commons/sandbox/functor/trunk/src:
main/java/org/apache/commons/functor/adapter/
main/java/org/apache/commons/functor/core/
main/java/org/apache/commons/functor/core/collection/
test/java/org/apache/commons/functor/adapter/
Author: mbenson
Date: Wed Sep 15 21:29:23 2010
New Revision: 997516
URL: http://svn.apache.org/viewvc?rev=997516&view=rev
Log:
remove useless type variables on right-bound functors; some spurious reformatting
Modified:
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/main/java/org/apache/commons/functor/core/IsEqual.java
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/IsNotEqual.java
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/LeftIdentity.java
commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/IsElementOf.java
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundFunction.java
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundPredicate.java
commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundProcedure.java
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=997516&r1=997515&r2=997516&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 Wed Sep 15 21:29:23 2010
@@ -38,28 +38,29 @@ import org.apache.commons.functor.UnaryF
* @version $Revision$ $Date$
* @author Rodney Waldhoff
*/
-public final class RightBoundFunction<L, R, T> implements UnaryFunction<L, T>, Serializable {
+public final class RightBoundFunction<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<? super A, Object, ? extends T> function;
/** The parameter to pass to that function. */
- private R param;
+ private Object param;
/**
* @param function the function to adapt
* @param arg the constant argument to use
*/
- public RightBoundFunction(BinaryFunction<? super L, ? super R, ? extends T> function, R arg) {
+ @SuppressWarnings("unchecked")
+ public <R> RightBoundFunction(BinaryFunction<? super A, ? super R, ? extends T> function, R arg) {
if (function == null) {
throw new IllegalArgumentException("left-hand BinaryFunction argument was null");
}
- this.function = function;
+ this.function = (BinaryFunction<? super A, Object, ? extends T>) function;
this.param = arg;
}
/**
* {@inheritDoc}
*/
- public T evaluate(L obj) {
+ public T evaluate(A obj) {
return function.evaluate(obj, param);
}
@@ -67,7 +68,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));
}
/**
@@ -75,7 +76,7 @@ public final class RightBoundFunction<L,
* @param that RightBoundFunction to test
* @return boolean
*/
- public boolean equals(RightBoundFunction<?, ?, ?> that) {
+ public boolean equals(RightBoundFunction<?, ?> that) {
return null != that
&& (null == function ? null == that.function : function.equals(that.function))
&& (null == param ? null == that.param : param.equals(that.param));
@@ -110,8 +111,8 @@ public final class RightBoundFunction<L,
* @param arg Object that will always be used for the right side of the BinaryFunction delegate.
* @return RightBoundFunction
*/
- public static <L, R, T> RightBoundFunction<L, R, T> bind(BinaryFunction<? super L, ? super R, ? extends T> function, R arg) {
- return null == function ? null : new RightBoundFunction<L, R, T>(function, arg);
+ public static <L, R, T> RightBoundFunction<L, T> bind(BinaryFunction<? super L, ? super R, ? extends T> function, R arg) {
+ return null == function ? null : new RightBoundFunction<L, T>(function, arg);
}
}
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=997516&r1=997515&r2=997516&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 Wed Sep 15 21:29:23 2010
@@ -38,29 +38,30 @@ import org.apache.commons.functor.UnaryP
* @version $Revision$ $Date$
* @author Rodney Waldhoff
*/
-public final class RightBoundPredicate<L, R> implements UnaryPredicate<L>, Serializable {
+public final class RightBoundPredicate<A> implements UnaryPredicate<A>, Serializable {
/** The {@link BinaryPredicate BinaryPredicate} I'm wrapping. */
- private BinaryPredicate<? super L, ? super R> predicate;
+ private BinaryPredicate<? super A, Object> predicate;
/** The parameter to pass to that predicate. */
- private R param;
+ private Object param;
/**
* Create a new RightBoundPredicate.
* @param predicate the predicate to adapt
* @param arg the constant argument to use
*/
- public RightBoundPredicate(BinaryPredicate<? super L, ? super R> predicate, R arg) {
+ @SuppressWarnings("unchecked")
+ public <R> RightBoundPredicate(BinaryPredicate<? super A, ? super R> predicate, R arg) {
if (predicate == null) {
throw new IllegalArgumentException("BinaryPredicate argument was null");
}
- this.predicate = predicate;
+ this.predicate = (BinaryPredicate<? super A, Object>) predicate;
this.param = arg;
}
/**
* {@inheritDoc}
*/
- public boolean test(L obj) {
+ public boolean test(A obj) {
return predicate.test(obj, param);
}
@@ -68,7 +69,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));
}
/**
@@ -76,7 +77,7 @@ public final class RightBoundPredicate<L
* @param that RightBoundPredicate to test
* @return boolean
*/
- public boolean equals(RightBoundPredicate<?, ?> that) {
+ public boolean equals(RightBoundPredicate<?> that) {
return null != that
&& (null == predicate ? null == that.predicate : predicate.equals(that.predicate))
&& (null == param ? null == that.param : param.equals(that.param));
@@ -111,8 +112,8 @@ public final class RightBoundPredicate<L
* @param arg right side
* @return RightBoundPredicate
*/
- public static <L, R> RightBoundPredicate<L, R> bind(BinaryPredicate<? super L, ? super R> predicate, R arg) {
- return null == predicate ? null : new RightBoundPredicate<L, R>(predicate, arg);
+ public static <L, R> RightBoundPredicate<L> bind(BinaryPredicate<? super L, ? super R> predicate, R arg) {
+ return null == predicate ? null : new RightBoundPredicate<L>(predicate, arg);
}
}
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=997516&r1=997515&r2=997516&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 Wed Sep 15 21:29:23 2010
@@ -38,29 +38,30 @@ import org.apache.commons.functor.UnaryP
* @version $Revision$ $Date$
* @author Rodney Waldhoff
*/
-public final class RightBoundProcedure<L, R> implements UnaryProcedure<L>, Serializable {
+public final class RightBoundProcedure<A> implements UnaryProcedure<A>, Serializable {
/** The {@link BinaryProcedure BinaryProcedure} I'm wrapping. */
- private BinaryProcedure<? super L, ? super R> procedure;
+ private BinaryProcedure<? super A, Object> procedure;
/** The parameter to pass to that procedure. */
- private R param;
+ private Object param;
/**
* Create a new RightBoundProcedure.
* @param procedure the procedure to adapt
* @param arg the constant argument to use
*/
- public RightBoundProcedure(BinaryProcedure<? super L, ? super R> procedure, R arg) {
+ @SuppressWarnings("unchecked")
+ public <R> RightBoundProcedure(BinaryProcedure<? super A, ? super R> procedure, R arg) {
if (procedure == null) {
throw new IllegalArgumentException("BinaryProcedure argument was null");
}
- this.procedure = procedure;
+ this.procedure = (BinaryProcedure<? super A, Object>) procedure;
this.param = arg;
}
/**
* {@inheritDoc}
*/
- public void run(L obj) {
+ public void run(A obj) {
procedure.run(obj, param);
}
@@ -68,7 +69,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));
}
/**
@@ -76,7 +77,7 @@ public final class RightBoundProcedure<L
* @param that RightBoundProcedure to test
* @return boolean
*/
- public boolean equals(RightBoundProcedure<?, ?> that) {
+ public boolean equals(RightBoundProcedure<?> that) {
return null != that
&& (null == procedure ? null == that.procedure : procedure.equals(that.procedure))
&& (null == param ? null == that.param : param.equals(that.param));
@@ -111,8 +112,8 @@ public final class RightBoundProcedure<L
* @param arg right side argument
* @return RightBoundProcedure
*/
- public static <L, R> RightBoundProcedure<L, R> bind(BinaryProcedure<? super L, ? super R> procedure, R arg) {
- return null == procedure ? null : new RightBoundProcedure<L, R>(procedure, arg);
+ public static <L, R> RightBoundProcedure<L> bind(BinaryProcedure<? super L, ? super R> procedure, R arg) {
+ return null == procedure ? null : new RightBoundProcedure<L>(procedure, arg);
}
}
Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/IsEqual.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/IsEqual.java?rev=997516&r1=997515&r2=997516&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/IsEqual.java (original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/IsEqual.java Wed Sep 15 21:29:23 2010
@@ -59,7 +59,7 @@ public final class IsEqual<L, R> impleme
* {@inheritDoc}
*/
public boolean test(L left, R right) {
- return left == right || left != null && left.equals(right);
+ return left == right || left != null && left.equals(right);
}
/**
@@ -101,6 +101,6 @@ public final class IsEqual<L, R> impleme
* @return UnaryPredicate<L>
*/
public static <L, R> UnaryPredicate<L> to(R object) {
- return new RightBoundPredicate<L, R>(new IsEqual<L, R>(), object);
+ return new RightBoundPredicate<L>(new IsEqual<L, R>(), object);
}
}
Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/IsNotEqual.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/IsNotEqual.java?rev=997516&r1=997515&r2=997516&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/IsNotEqual.java (original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/IsNotEqual.java Wed Sep 15 21:29:23 2010
@@ -82,7 +82,7 @@ public final class IsNotEqual<L, R> impl
// static methods
// ------------------------------------------------------------------------
-
+
/**
* Get an IsNotEqual instance.
* @param <L>
@@ -101,6 +101,6 @@ public final class IsNotEqual<L, R> impl
* @return UnaryPredicate<L>
*/
public static <L, R> UnaryPredicate<L> to(R object) {
- return new RightBoundPredicate<L, R>(new IsNotEqual<L, R>(), object);
+ return new RightBoundPredicate<L>(new IsNotEqual<L, R>(), object);
}
}
Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/LeftIdentity.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/LeftIdentity.java?rev=997516&r1=997515&r2=997516&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/LeftIdentity.java (original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/LeftIdentity.java Wed Sep 15 21:29:23 2010
@@ -70,6 +70,7 @@ public final class LeftIdentity {
* @return BinaryPredicate<Boolean, R>
*/
public static <R> BinaryPredicate<Boolean, R> predicate() {
- return BinaryFunctionBinaryPredicate.adapt(IgnoreRightFunction.<Boolean, R, Boolean>adapt(new Identity<Boolean>()));
+ return BinaryFunctionBinaryPredicate.adapt(IgnoreRightFunction
+ .<Boolean, R, Boolean> adapt(new Identity<Boolean>()));
}
}
Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/IsElementOf.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/IsElementOf.java?rev=997516&r1=997515&r2=997516&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/IsElementOf.java (original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/IsElementOf.java Wed Sep 15 21:29:23 2010
@@ -135,9 +135,9 @@ public final class IsElementOf<L, R> imp
if (null == obj) {
throw new NullPointerException("Argument must not be null");
} else if (obj instanceof Collection<?>) {
- return new RightBoundPredicate<A, Object>(new IsElementOf<A, Object>(), obj);
+ return new RightBoundPredicate<A>(new IsElementOf<A, Object>(), obj);
} else if (obj.getClass().isArray()) {
- return new RightBoundPredicate<A, Object>(new IsElementOf<A, Object>(), obj);
+ return new RightBoundPredicate<A>(new IsElementOf<A, Object>(), obj);
} else {
throw new IllegalArgumentException("Expected Collection or Array, found " + obj.getClass());
}
Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundFunction.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundFunction.java?rev=997516&r1=997515&r2=997516&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundFunction.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundFunction.java Wed Sep 15 21:29:23 2010
@@ -46,7 +46,7 @@ public class TestRightBoundFunction exte
// ------------------------------------------------------------------------
protected Object makeFunctor() {
- return new RightBoundFunction<Object, Object, Object>(LeftIdentity.FUNCTION,"xyzzy");
+ return new RightBoundFunction<Object, Object>(LeftIdentity.FUNCTION,"xyzzy");
}
// Lifecycle
@@ -71,10 +71,10 @@ public class TestRightBoundFunction exte
public void testEquals() throws Exception {
UnaryFunction<Object, Object> f = RightBoundFunction.bind(LeftIdentity.FUNCTION,"xyzzy");
assertEquals(f,f);
- assertObjectsAreEqual(f,new RightBoundFunction<Object, Object, Object>(LeftIdentity.FUNCTION,"xyzzy"));
+ assertObjectsAreEqual(f,new RightBoundFunction<Object, Object>(LeftIdentity.FUNCTION,"xyzzy"));
assertObjectsAreNotEqual(f,Constant.of("xyzzy"));
- assertObjectsAreNotEqual(f,new RightBoundFunction<Object, Object, Object>(RightIdentity.FUNCTION,"xyzzy"));
- assertObjectsAreNotEqual(f,new RightBoundFunction<Object, Object, Object>(LeftIdentity.FUNCTION,"bar"));
+ assertObjectsAreNotEqual(f,new RightBoundFunction<Object, Object>(RightIdentity.FUNCTION,"xyzzy"));
+ assertObjectsAreNotEqual(f,new RightBoundFunction<Object, Object>(LeftIdentity.FUNCTION,"bar"));
}
public void testAdaptNull() throws Exception {
Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundPredicate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundPredicate.java?rev=997516&r1=997515&r2=997516&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundPredicate.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundPredicate.java Wed Sep 15 21:29:23 2010
@@ -45,7 +45,7 @@ public class TestRightBoundPredicate ext
// ------------------------------------------------------------------------
protected Object makeFunctor() {
- return new RightBoundPredicate<Object, Object>(Constant.TRUE,"xyzzy");
+ return new RightBoundPredicate<Object>(Constant.TRUE, "xyzzy");
}
// Lifecycle
@@ -63,28 +63,28 @@ public class TestRightBoundPredicate ext
// ------------------------------------------------------------------------
public void testTest() throws Exception {
- UnaryPredicate<Boolean> f = new RightBoundPredicate<Boolean, Object>(
+ UnaryPredicate<Boolean> f = new RightBoundPredicate<Boolean>(
new BinaryFunctionBinaryPredicate<Boolean, Object>(LeftIdentity.<Boolean, Object> function()), "foo");
- assertEquals(true,f.test(Boolean.TRUE));
- assertEquals(false,f.test(Boolean.FALSE));
+ assertEquals(true, f.test(Boolean.TRUE));
+ assertEquals(false, f.test(Boolean.FALSE));
}
public void testEquals() throws Exception {
- UnaryPredicate<Boolean> f = new RightBoundPredicate<Boolean, Object>(Constant.TRUE,"xyzzy");
- assertEquals(f,f);
- assertObjectsAreEqual(f,new RightBoundPredicate<Boolean, Object>(Constant.TRUE,"xyzzy"));
- assertObjectsAreNotEqual(f,Constant.TRUE);
- assertObjectsAreNotEqual(f,new RightBoundPredicate<Boolean, Object>(Constant.FALSE,"xyzzy"));
- assertObjectsAreNotEqual(f,new RightBoundPredicate<Boolean, Object>(Constant.TRUE,"foo"));
- assertObjectsAreNotEqual(f,new RightBoundPredicate<Boolean, Object>(Constant.TRUE,null));
+ UnaryPredicate<Boolean> f = new RightBoundPredicate<Boolean>(Constant.TRUE, "xyzzy");
+ assertEquals(f, f);
+ assertObjectsAreEqual(f, new RightBoundPredicate<Boolean>(Constant.TRUE, "xyzzy"));
+ assertObjectsAreNotEqual(f, Constant.TRUE);
+ assertObjectsAreNotEqual(f, new RightBoundPredicate<Boolean>(Constant.FALSE, "xyzzy"));
+ assertObjectsAreNotEqual(f, new RightBoundPredicate<Boolean>(Constant.TRUE, "foo"));
+ assertObjectsAreNotEqual(f, new RightBoundPredicate<Boolean>(Constant.TRUE, null));
}
public void testAdaptNull() throws Exception {
- assertNull(RightBoundPredicate.bind(null,"xyzzy"));
+ assertNull(RightBoundPredicate.bind(null, "xyzzy"));
}
public void testAdapt() throws Exception {
- assertNotNull(RightBoundPredicate.bind(Constant.FALSE,"xyzzy"));
- assertNotNull(RightBoundPredicate.bind(Constant.FALSE,null));
+ assertNotNull(RightBoundPredicate.bind(Constant.FALSE, "xyzzy"));
+ assertNotNull(RightBoundPredicate.bind(Constant.FALSE, null));
}
}
Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundProcedure.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundProcedure.java?rev=997516&r1=997515&r2=997516&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundProcedure.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/adapter/TestRightBoundProcedure.java Wed Sep 15 21:29:23 2010
@@ -45,7 +45,7 @@ public class TestRightBoundProcedure ext
// ------------------------------------------------------------------------
protected Object makeFunctor() {
- return new RightBoundProcedure<Object, Object>(NoOp.INSTANCE,"xyzzy");
+ return new RightBoundProcedure<Object>(NoOp.INSTANCE,"xyzzy");
}
// Lifecycle
@@ -63,20 +63,20 @@ public class TestRightBoundProcedure ext
// ------------------------------------------------------------------------
public void testRun() throws Exception {
- UnaryProcedure<Object> p = new RightBoundProcedure<Object, Object>(
+ UnaryProcedure<Object> p = new RightBoundProcedure<Object>(
new BinaryFunctionBinaryProcedure<Object, Object>(LeftIdentity.FUNCTION), "foo");
p.run(Boolean.TRUE);
p.run(Boolean.FALSE);
}
public void testEquals() throws Exception {
- UnaryProcedure<Object> f = new RightBoundProcedure<Object, Object>(NoOp.INSTANCE,"xyzzy");
+ UnaryProcedure<Object> f = new RightBoundProcedure<Object>(NoOp.INSTANCE,"xyzzy");
assertEquals(f,f);
- assertObjectsAreEqual(f,new RightBoundProcedure<Object, Object>(NoOp.INSTANCE,"xyzzy"));
+ assertObjectsAreEqual(f,new RightBoundProcedure<Object>(NoOp.INSTANCE,"xyzzy"));
assertObjectsAreNotEqual(f,NoOp.INSTANCE);
- assertObjectsAreNotEqual(f,new RightBoundProcedure<Object, Object>(new BinaryFunctionBinaryProcedure<Object, Object>(LeftIdentity.FUNCTION),"xyzzy"));
- assertObjectsAreNotEqual(f,new RightBoundProcedure<Object, Object>(NoOp.INSTANCE,"foo"));
- assertObjectsAreNotEqual(f,new RightBoundProcedure<Object, Object>(NoOp.INSTANCE,null));
+ assertObjectsAreNotEqual(f,new RightBoundProcedure<Object>(new BinaryFunctionBinaryProcedure<Object, Object>(LeftIdentity.FUNCTION),"xyzzy"));
+ assertObjectsAreNotEqual(f,new RightBoundProcedure<Object>(NoOp.INSTANCE,"foo"));
+ assertObjectsAreNotEqual(f,new RightBoundProcedure<Object>(NoOp.INSTANCE,null));
}
public void testAdaptNull() throws Exception {