src/share/classes/java/util/function/ToDoubleFunction.java

Print this page
rev 7675 : 8019840: Spec updates for java.util.function
Reviewed-by: mduigou
Contributed-by: brian.goetz@oracle.com

@@ -23,24 +23,27 @@
  * questions.
  */
 package java.util.function;
 
 /**
- * Apply a function to the input argument, yielding an appropriate result.
- * This is the {@code double}-bearing specialization for {@link Function}.
+ * Represents a function that produces a double-valued result.  This is the
+ * {@code double}-producing primitive specialization for {@link Function}.
  *
- * @param <T> the type of input objects to the function
+ * <p>This is a <a href="package-summary.html">functional interface</a>
+ * whose functional method is {@link #applyAsDouble(Object)}.
+ *
+ * @param <T> the type of the input to the function
  *
  * @see Function
  * @since 1.8
  */
 @FunctionalInterface
 public interface ToDoubleFunction<T> {
 
     /**
-     * Compute the result of applying the function to the input argument
+     * Applies this function to the given argument.
      *
-     * @param t the input object
-     * @return the function result value
+     * @param value the function argument
+     * @return the function result
      */
-    double applyAsDouble(T t);
+    double applyAsDouble(T value);
 }