jdk/src/share/classes/java/util/function/LongFunction.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 long}
    28  * Apply a function to the long-valued input argument, yielding an appropriate
    29  * value; this is the {@code long}-bearing specialization for {@link Function}.
    29  * result. This is the {@code long}-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 LongFunction<T> {
    38 public interface LongFunction<R> {
    37 
    39 
    38     /**
    40     /**
    39      * Apply a function to the input object yielding an appropriate {@code long}
    41      * Compute the result of applying the function to the input argument
    40      * 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 long applyAsLong(T t);
    46     public R apply(long value);
    46 }
    47 }