commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1187616 - in /commons/proper/functor/trunk/src/main/java/org/apache/commons/functor: adapter/ core/algorithm/ generator/util/
Date Sat, 22 Oct 2011 01:10:48 GMT
Author: sebb
Date: Sat Oct 22 01:10:48 2011
New Revision: 1187616

URL: http://svn.apache.org/viewvc?rev=1187616&view=rev
Log:
Missing @Overrides
Explicit boxing

Modified:
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BinaryFunctionBinaryPredicate.java
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FunctionPredicate.java
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/PredicateFunction.java
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryFunctionUnaryPredicate.java
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryFunctionUnaryProcedure.java
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryPredicateUnaryFunction.java
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryProcedureUnaryFunction.java
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/IndexOfInGenerator.java
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/LongRange.java

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BinaryFunctionBinaryPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BinaryFunctionBinaryPredicate.java?rev=1187616&r1=1187615&r2=1187616&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BinaryFunctionBinaryPredicate.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/BinaryFunctionBinaryPredicate.java
Sat Oct 22 01:10:48 2011
@@ -65,12 +65,13 @@ public final class BinaryFunctionBinaryP
      * non-<code>Boolean</code>
      */
     public boolean test(final L left, final R right) {
-        return function.evaluate(left, right);
+        return function.evaluate(left, right).booleanValue();
     }
 
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean equals(final Object that) {
         return that == this
                 || (that instanceof BinaryFunctionBinaryPredicate<?, ?>
@@ -89,6 +90,7 @@ public final class BinaryFunctionBinaryP
     /**
      * {@inheritDoc}
      */
+    @Override
     public int hashCode() {
         int hash = "BinaryFunctionBinaryPredicate".hashCode();
         if (null != function) {
@@ -100,6 +102,7 @@ public final class BinaryFunctionBinaryP
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString() {
         return "BinaryFunctionBinaryPredicate<" + function + ">";
     }

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FunctionPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FunctionPredicate.java?rev=1187616&r1=1187615&r2=1187616&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FunctionPredicate.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/FunctionPredicate.java
Sat Oct 22 01:10:48 2011
@@ -63,12 +63,13 @@ public final class FunctionPredicate imp
      * {@inheritDoc}
      */
     public boolean test() {
-        return function.evaluate();
+        return function.evaluate().booleanValue();
     }
 
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean equals(Object that) {
         return that == this || (that instanceof FunctionPredicate && equals((FunctionPredicate)
that));
     }
@@ -85,6 +86,7 @@ public final class FunctionPredicate imp
     /**
      * {@inheritDoc}
      */
+    @Override
     public int hashCode() {
         int hash = "FunctionPredicate".hashCode();
         if (null != function) {
@@ -96,6 +98,7 @@ public final class FunctionPredicate imp
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString() {
         return "FunctionPredicate<" + function + ">";
     }

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/PredicateFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/PredicateFunction.java?rev=1187616&r1=1187615&r2=1187616&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/PredicateFunction.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/PredicateFunction.java
Sat Oct 22 01:10:48 2011
@@ -65,12 +65,13 @@ public final class PredicateFunction imp
      * @return a non-<code>null</code> <code>Boolean</code> instance
      */
     public Boolean evaluate() {
-        return predicate.test();
+        return Boolean.valueOf(predicate.test());
     }
 
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean equals(Object that) {
         return that == this || (that instanceof PredicateFunction && equals((PredicateFunction)
that));
     }
@@ -87,6 +88,7 @@ public final class PredicateFunction imp
     /**
      * {@inheritDoc}
      */
+    @Override
     public int hashCode() {
         int hash = "PredicateFunction".hashCode();
         if (null != predicate) {
@@ -98,6 +100,7 @@ public final class PredicateFunction imp
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString() {
         return "PredicateFunction<" + predicate + ">";
     }

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryFunctionUnaryPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryFunctionUnaryPredicate.java?rev=1187616&r1=1187615&r2=1187616&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryFunctionUnaryPredicate.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryFunctionUnaryPredicate.java
Sat Oct 22 01:10:48 2011
@@ -65,12 +65,13 @@ public final class UnaryFunctionUnaryPre
      * method of my underlying function.
      */
     public boolean test(A obj) {
-        return function.evaluate(obj);
+        return function.evaluate(obj).booleanValue();
     }
 
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean equals(Object that) {
         return that == this
                 || (that instanceof UnaryFunctionUnaryPredicate<?> && equals((UnaryFunctionUnaryPredicate<?>)
that));
@@ -88,6 +89,7 @@ public final class UnaryFunctionUnaryPre
     /**
      * {@inheritDoc}
      */
+    @Override
     public int hashCode() {
         int hash = "UnaryFunctionUnaryPredicate".hashCode();
         if (null != function) {
@@ -99,6 +101,7 @@ public final class UnaryFunctionUnaryPre
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString() {
         return "UnaryFunctionUnaryPredicate<" + function + ">";
     }

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryFunctionUnaryProcedure.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryFunctionUnaryProcedure.java?rev=1187616&r1=1187615&r2=1187616&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryFunctionUnaryProcedure.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryFunctionUnaryProcedure.java
Sat Oct 22 01:10:48 2011
@@ -71,6 +71,7 @@ public final class UnaryFunctionUnaryPro
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean equals(Object that) {
         return that == this
                 || (that instanceof UnaryFunctionUnaryProcedure<?> && equals((UnaryFunctionUnaryProcedure<?>)
that));
@@ -88,6 +89,7 @@ public final class UnaryFunctionUnaryPro
     /**
      * {@inheritDoc}
      */
+    @Override
     public int hashCode() {
         int hash = "UnaryFunctionUnaryProcedure".hashCode();
         if (null != function) {
@@ -99,6 +101,7 @@ public final class UnaryFunctionUnaryPro
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString() {
         return "UnaryFunctionUnaryProcedure<" + function + ">";
     }

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryPredicateUnaryFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryPredicateUnaryFunction.java?rev=1187616&r1=1187615&r2=1187616&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryPredicateUnaryFunction.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryPredicateUnaryFunction.java
Sat Oct 22 01:10:48 2011
@@ -66,12 +66,13 @@ public final class UnaryPredicateUnaryFu
      * @return a non-<code>null</code> <code>Boolean</code> instance
      */
     public Boolean evaluate(A obj) {
-        return predicate.test(obj);
+        return Boolean.valueOf(predicate.test(obj));
     }
 
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean equals(Object that) {
         return that == this
                 || (that instanceof UnaryPredicateUnaryFunction<?> && equals((UnaryPredicateUnaryFunction<?>)
that));
@@ -89,6 +90,7 @@ public final class UnaryPredicateUnaryFu
     /**
      * {@inheritDoc}
      */
+    @Override
     public int hashCode() {
         int hash = "UnaryPredicateUnaryFunction".hashCode();
         if (null != predicate) {
@@ -100,6 +102,7 @@ public final class UnaryPredicateUnaryFu
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString() {
         return "UnaryPredicateUnaryFunction<" + predicate + ">";
     }

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryProcedureUnaryFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryProcedureUnaryFunction.java?rev=1187616&r1=1187615&r2=1187616&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryProcedureUnaryFunction.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/adapter/UnaryProcedureUnaryFunction.java
Sat Oct 22 01:10:48 2011
@@ -70,6 +70,7 @@ public final class UnaryProcedureUnaryFu
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean equals(Object that) {
         return that == this || (that instanceof UnaryProcedureUnaryFunction<?, ?>
                                     && equals((UnaryProcedureUnaryFunction<?,
?>) that));
@@ -87,6 +88,7 @@ public final class UnaryProcedureUnaryFu
     /**
      * {@inheritDoc}
      */
+    @Override
     public int hashCode() {
         int hash = "UnaryProcedureUnaryFunction".hashCode();
         if (null != procedure) {
@@ -98,6 +100,7 @@ public final class UnaryProcedureUnaryFu
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString() {
         return "UnaryProcedureUnaryFunction<" + procedure + ">";
     }

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/IndexOfInGenerator.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/IndexOfInGenerator.java?rev=1187616&r1=1187615&r2=1187616&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/IndexOfInGenerator.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/algorithm/IndexOfInGenerator.java
Sat Oct 22 01:10:48 2011
@@ -95,12 +95,13 @@ public final class IndexOfInGenerator<T>
     public Number evaluate(Generator<? extends T> left, UnaryPredicate<? super T>
right) {
         IndexProcedure<T> findProcedure = new IndexProcedure<T>(left, right);
         left.run(findProcedure);
-        return findProcedure.index;
+        return Long.valueOf(findProcedure.index);
     }
 
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean equals(Object obj) {
         return obj == this || obj != null && obj.getClass().equals(getClass());
     }
@@ -108,6 +109,7 @@ public final class IndexOfInGenerator<T>
     /**
      * {@inheritDoc}
      */
+    @Override
     public int hashCode() {
         return System.identityHashCode(INSTANCE);
     }

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/LongRange.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/LongRange.java?rev=1187616&r1=1187615&r2=1187616&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/LongRange.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/LongRange.java
Sat Oct 22 01:10:48 2011
@@ -97,11 +97,11 @@ public final class LongRange extends Bas
     public void run(UnaryProcedure<? super Long> proc) {
         if (signOf(step) == -1L) {
             for (long i = from; i > to; i += step) {
-                proc.run(i);
+                proc.run(Long.valueOf(i));
             }
         } else {
             for (long i = from; i < to; i += step) {
-                proc.run(i);
+                proc.run(Long.valueOf(i));
             }
         }
     }
@@ -109,6 +109,7 @@ public final class LongRange extends Bas
     /**
      * {@inheritDoc}
      */
+    @Override
     public String toString() {
         return "LongRange<" + from + "," + to + "," + step + ">";
     }
@@ -116,6 +117,7 @@ public final class LongRange extends Bas
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
@@ -130,6 +132,7 @@ public final class LongRange extends Bas
     /**
      * {@inheritDoc}
      */
+    @Override
     public int hashCode() {
         int hash = "LongRange".hashCode();
         hash <<= 2;



Mime
View raw message