jdk/src/share/classes/java/util/function/DoubleFunction.java
changeset 16011 890a7ed97f6c
parent 15647 314007859004
child 17695 032254f2467b
equal deleted inserted replaced
16010:2727163b5df5 16011:890a7ed97f6c
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 package java.util.function;
    25 package java.util.function;
    26 
    26 
    27 /**
    27 /**
    28  * Apply a function to the input object yielding an appropriate {@code double}
    28  * Apply a function to the double-valued input argument, yielding an appropriate
    29  * value; this is the {@code double}-bearing specialization for {@link Function}.
    29  * result. This is the {@code double}-consuming primitive specialization for
       
    30  * {@link Function}.
    30  *
    31  *
    31  * @param <T> the type of input objects to the function
    32  * @param <R> the type of output objects from the function
    32  *
    33  *
       
    34  * @see Function
    33  * @since 1.8
    35  * @since 1.8
    34  */
    36  */
    35 @FunctionalInterface
    37 @FunctionalInterface
    36 public interface DoubleFunction<T> {
    38 public interface DoubleFunction<R> {
    37 
    39 
    38     /**
    40     /**
    39      * Apply a function to the input object yielding an appropriate
    41      * Compute the result of applying the function to the input argument
    40      * {@code double} value.
       
    41      *
    42      *
    42      * @param t the input object
    43      * @param value the input value
    43      * @return the function result value
    44      * @return the function result
    44      */
    45      */
    45     public double applyAsDouble(T t);
    46     public R apply(double value);
    46 }
    47 }