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

Print this page
rev 7047 : 8004015: Additional static and instance utils for functional interfaces.
Reviewed-by: briangoetz


  29  * This is the {@code long}-bearing specialization for {@link BiFunction}.
  30  *
  31  * @param <T> the type of the first argument to the {@code applyAsLong}
  32  * operation.
  33  * @param <U> the type of the second argument to the {@code applyAsLong}
  34  * operation.
  35  *
  36  * @see BiFunction
  37  * @since 1.8
  38  */
  39 @FunctionalInterface
  40 public interface ToLongBiFunction<T, U> {
  41 
  42     /**
  43      * Compute the result of applying the function to the input arguments.
  44      *
  45      * @param t an input object
  46      * @param u an input object
  47      * @return the function result value
  48      */
  49     public long applyAsLong(T t, U u);
  50 }


  29  * This is the {@code long}-bearing specialization for {@link BiFunction}.
  30  *
  31  * @param <T> the type of the first argument to the {@code applyAsLong}
  32  * operation.
  33  * @param <U> the type of the second argument to the {@code applyAsLong}
  34  * operation.
  35  *
  36  * @see BiFunction
  37  * @since 1.8
  38  */
  39 @FunctionalInterface
  40 public interface ToLongBiFunction<T, U> {
  41 
  42     /**
  43      * Compute the result of applying the function to the input arguments.
  44      *
  45      * @param t an input object
  46      * @param u an input object
  47      * @return the function result value
  48      */
  49     long applyAsLong(T t, U u);
  50 }