Interface Function2<T1,​T2,​R>

  • All Superinterfaces:
    java.util.function.BiFunction<T1,​T2,​R>
    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 Function2<T1,​T2,​R>
    extends java.util.function.BiFunction<T1,​T2,​R>
    A function with 2 arguments.
    • Method Detail

      • apply

        default R apply​(Tuple2<? extends T1,​? extends T2> args)
        Apply this function to the arguments.
        Parameters:
        args - The arguments as a tuple.
      • apply

        R apply​(T1 v1,
                T2 v2)
        Apply this function to the arguments.
        Specified by:
        apply in interface java.util.function.BiFunction<T1,​T2,​R>
      • toBiFunction

        default java.util.function.BiFunction<T1,​T2,​R> toBiFunction()
        Convert this function to a BiFunction.
      • from

        static <T1,​T2,​R> Function2<T1,​T2,​R> from​(java.util.function.BiFunction<? super T1,​? super T2,​? extends R> function)
        Convert to this function to a BiFunction.
      • applyPartially

        default Function1<T2,​R> applyPartially​(T1 v1)
        Partially apply this function to the arguments.
      • applyPartially

        default Function0<R> applyPartially​(T1 v1,
                                            T2 v2)
        Partially apply this function to the arguments.
      • applyPartially

        default Function1<T2,​R> applyPartially​(Tuple1<? extends T1> args)
        Partially apply this function to the arguments.
      • applyPartially

        default Function0<R> applyPartially​(Tuple2<? extends T1,​? extends T2> args)
        Partially apply this function to the arguments.