Top Description Methods
java.util.function

public Interface BiFunction<T, U, R>

Known Direct Subinterfaces
java.util.function.BinaryOperator
Known Direct Implementers
jdk.internal.foreign.AbstractMemorySegmentImpl
Annotations
@FunctionalInterface
Type Parameters
<T>
the type of the first argument to the function
<U>
the type of the second argument to the function
<R>
the type of the result of the function
Imports
java.util.Objects

Represents a function that accepts two arguments and produces a result. This is the two-arity specialization of Function.

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

Since
1.8
See Also
Function

Method Summary

Modifier and TypeMethod and Description
public default <
the type of output of the after function, and of the composed function
V
>
BiFunction<T, U, V>

Returns:

a composed function that first applies this function and then applies the after function
andThen
(Function<? super R, ? extends V>
the function to apply after this function is applied
after
)

Returns a composed function that first applies this function to its input, and then applies the after function to the result.

public R

Returns:

the function result
apply
(T
the first function argument
t
,
U
the second function argument
u
)

Applies this function to the given arguments.

Method Detail

andThenback to summary
public default <V> BiFunction<T, U, V> andThen(Function<? super R, ? extends V> after)

Returns a composed function that first applies this function to its input, and then applies the after function to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.

Parameters
<V>
the type of output of the after function, and of the composed function
after:Function<? super R, ? extends V>

the function to apply after this function is applied

Returns:BiFunction<T, U, V>

a composed function that first applies this function and then applies the after function

Exceptions
NullPointerException:
if after is null
applyback to summary
public R apply(T t, U u)

Applies this function to the given arguments.

Parameters
t:T

the first function argument

u:U

the second function argument

Returns:R

the function result