BiFunction
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
BinaryOperator<T> |
Represents an operation upon two operands of the same type, producing a result
of the same type as the operands. |
|
Public Method Summary
<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.
|
abstract
R
|
apply(T t, U u)
Applies this function to the given arguments.
|
Public Methods
public
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
after |
the function to apply after this function is applied |
Returns
- a composed function that first applies this function and then
applies the
after
function
public
abstract
R
apply
(T t, U u)
Applies this function to the given arguments.
Parameters
t |
the first function argument |
u |
the second function argument |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["`BiFunction` represents a function that accepts two arguments and produces a result."],["It is a functional interface with a primary method `apply(Object, Object)` that executes the function's logic."],["The `andThen` method allows chaining another function to be applied to the result of the initial `BiFunction`."],["`BiFunction` is a specialization of the `Function` interface, specifically designed for two-argument functions."]]],["`BiFunction` is a functional interface representing a function that accepts two arguments and produces a result. It's a two-arity specialization of `Function`. The core method is `apply(T t, U u)`, which applies the function to given arguments, returning the result. The `andThen` method allows composing functions, applying the `BiFunction` first and then another provided function to its result, returning the new composed function. `BinaryOperator` is a known indirect subclass of `BiFunction`.\n"]]