commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1175839 - /commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryFunction.java
Date Mon, 26 Sep 2011 12:46:59 GMT
Author: simonetripodi
Date: Mon Sep 26 12:46:59 2011
New Revision: 1175839

URL: http://svn.apache.org/viewvc?rev=1175839&view=rev
Log:
added missing javadoc comments

Modified:
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryFunction.java

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryFunction.java?rev=1175839&r1=1175838&r2=1175839&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryFunction.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryFunction.java
Mon Sep 26 12:46:59 2011
@@ -44,6 +44,8 @@ import org.apache.commons.functor.UnaryF
  * an instance whose delegates are not all
  * <code>Serializable</code> will result in an exception.
  * </p>
+ * @param <A> the argument type.
+ * @param <T> the returned value type.
  * @version $Revision$ $Date$
  * @author Rodney Waldhoff
  * @author Matt Benson
@@ -55,7 +57,7 @@ public class CompositeUnaryFunction<A, T
      */
     private static final long serialVersionUID = 4945193629275757281L;
 
-    /** Base hash integer used to shift hash */
+    /** Base hash integer used to shift hash. */
     private static final int HASH_SHIFT = 4;
 
     /**
@@ -69,7 +71,13 @@ public class CompositeUnaryFunction<A, T
          * serialVersionUID declaration.
          */
         private static final long serialVersionUID = 8167255331321876718L;
+        /**
+         * The last evaluator function.
+         */
         private UnaryFunction<? super X, ? extends T> following;
+        /**
+         * The first evaluator function.
+         */
         private UnaryFunction<? super A, ? extends X> preceding;
 
         /**
@@ -98,6 +106,12 @@ public class CompositeUnaryFunction<A, T
             return obj == this || obj instanceof Helper<?, ?, ?> && equals((Helper<?,
?, ?>) obj);
         }
 
+        /**
+         * Checks if input helper is equals to this instance.
+         *
+         * @param helper the helper to check
+         * @return true, if helpers are equals, false otherwise
+         */
         private boolean equals(Helper<?, ?, ?> helper) {
             return helper.following.equals(following) && helper.preceding.equals(preceding);
         }
@@ -124,6 +138,9 @@ public class CompositeUnaryFunction<A, T
         }
     }
 
+    /**
+     * The adapted function.
+     */
     private final UnaryFunction<? super A, ? extends T> function;
 
     /**
@@ -137,6 +154,13 @@ public class CompositeUnaryFunction<A, T
         this.function = function;
     }
 
+    /**
+     * Creates a new {@link CompositeUnaryFunction} instance given the input functions.
+     *
+     * @param <X> the argument type.
+     * @param following The first evaluator function.
+     * @param preceding The last evaluator function.
+     */
     private <X> CompositeUnaryFunction(UnaryFunction<? super X, ? extends T>
following,
             UnaryFunction<? super A, ? extends X> preceding) {
         this.function = new Helper<X, A, T>(following, preceding);



Mime
View raw message