## Uses of Interface
java.util.function.BiFunction

- Packages that use BiFunction
  Package | Description
  --- | ---
  java.util |
  java.util.function | Functional interfaces provide target types for lambda expressions and method references.
  java.util.stream | Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.

- - ### Uses of BiFunction in java.util

    Methods in java.util with parameters of type BiFunction
    Modifier and Type | Method and Description
    --- | ---
    `default V` | Map.`compute(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)` Attempts to compute a mapping for the specified key and its current mapped value (or `null` if there is no current mapping).
    `default V` | Map.`computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)` If the value for the specified key is present and non-null, attempts to compute a new mapping given the key and its current mapped value.
    `default V` | Map.`merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction)` If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value.
    `default void` | Map.`replaceAll(BiFunction<? super K,? super V,? extends V> function)` Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception.

  - ### Uses of BiFunction in java.util.function

    Subinterfaces of BiFunction in java.util.function
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `BinaryOperator<T>` Represents an operation upon two operands of the same type, producing a result of the same type as the operands.

    Methods in java.util.function that return BiFunction
    Modifier and Type | Method and Description
    --- | ---
    `default <V> BiFunction<T,U,V>` | BiFunction.`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.

  - ### Uses of BiFunction in java.util.stream

    Methods in java.util.stream with parameters of type BiFunction
    Modifier and Type | Method and Description
    --- | ---
    `<U> U` | Stream.`reduce(U identity, BiFunction<U,? super T,U> accumulator, BinaryOperator<U> combiner)` Performs a reduction on the elements of this stream, using the provided identity, accumulation and combining functions.

Copyright © 2025 API Design. All Rights Reserved.