Interface ToIntBiFunction<T,​U>

Type Parameters:
T - the type of the first argument to the function
U - the type of the second argument to the function
All Superinterfaces:
BiFunction<T,​U,​Integer>, BiFunction<T,​U,​Integer>, ToIntBiFunction<T,​U>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface ToIntBiFunction<T,​U>
extends BiFunction<T,​U,​Integer>, ToIntBiFunction<T,​U>
Represents a function that accepts two arguments and produces an int-valued result. This is the int-producing primitive specialization for BiFunction.

This is a functional interface whose functional method is applyAsInt(Object, Object).

Since:
1.8
See Also:
BiFunction
  • Method Details

    • applyAsInt

      int applyAsInt​(T t, U u)
      Applies this function to the given arguments.
      Specified by:
      applyAsInt in interface ToIntBiFunction<T,​U>
      Parameters:
      t - the first function argument
      u - the second function argument
      Returns:
      the function result
    • apply

      default Integer apply​(T t, U u)
      Applies this function to the given arguments.
      Specified by:
      apply in interface BiFunction<T,​U,​Integer>
      Specified by:
      apply in interface BiFunction<T,​U,​Integer>
      Parameters:
      t - the first function argument
      u - the second function argument
      Returns:
      the function result
    • applyPartial

      default IntSupplier applyPartial​(T t, U u)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Specified by:
      applyPartial in interface BiFunction<T,​U,​Integer>
      Parameters:
      t - the first function argument
      u - the second function argument
      Returns:
      the function result
    • applyPartialL

      default ToIntFunction<U> applyPartialL​(T t)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Specified by:
      applyPartialL in interface BiFunction<T,​U,​Integer>
      Parameters:
      t - the function argument
      Returns:
      the function result
    • applyPartialR

      default ToIntFunction<T> applyPartialR​(U u)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Specified by:
      applyPartialR in interface BiFunction<T,​U,​Integer>
      Parameters:
      u - the function argument
      Returns:
      the function result
    • consume

      default BiConsumer<T,​U> consume​(IntConsumer consumer)
      Consume a function.
      Parameters:
      consumer - The consumer to use in consuming.
      Returns:
      A Consumer which passes it's argument to this function and then passes the result into the given consumer.
    • map

      default ToIntBiFunction<T,​U> map​(IntUnaryOperator functor)
      Lift a function.
      Parameters:
      functor - The function to use in lifting.
      Returns:
      A function that passes the result of fn through a functor to produce a lifted function.
    • mapToObj

      default <S> BiFunction<T,​U,​S> mapToObj​(IntFunction<? extends S> functor)
      Lift a function.
      Type Parameters:
      S - The return type.
      Parameters:
      functor - The function to use in lifting.
      Returns:
      A function that passes the result of fn through a functor to produce a lifted function.
    • mapToPredicate

      default BiPredicate<T,​U> mapToPredicate​(IntPredicate functor)
      Lift a function.
      Parameters:
      functor - The function to use in lifting.
      Returns:
      A function that passes the result of fn through a functor to produce a lifted function.
    • mapToDouble

      default ToDoubleBiFunction<T,​U> mapToDouble​(IntToDoubleFunction functor)
      Lift a function.
      Parameters:
      functor - The function to use in lifting.
      Returns:
      A function that passes the result of fn through a functor to produce a lifted function.
    • mapToLong

      default ToLongBiFunction<T,​U> mapToLong​(IntToLongFunction functor)
      Lift a function.
      Parameters:
      functor - The function to use in lifting.
      Returns:
      A function that passes the result of fn through a functor to produce a lifted function.