Uses of Interface
java.util.function.BiFunction
Package
Description
Provides specific components, transformations, and tools built on top of the
java.lang.classfile
PREVIEW library.Provides the classes and interfaces for the security framework.
Contains the collections framework, some internationalization support classes,
a service loader, properties, random number generation, string parsing
and scanning classes, base64 encoding and decoding, a bit array, and
several miscellaneous utility classes.
Utility classes commonly useful in concurrent programming.
Functional interfaces provide target types for lambda expressions
and method references.
Provides the classes and interfaces of
the Java 2 platform's core logging facilities.
Classes to support functional-style operations on streams of elements, such
as map-reduce transformations on collections.
Provides classes for the secure socket package.
Provides interfaces for creating tools, such as a Read-Eval-Print Loop (REPL),
which interactively evaluate "snippets" of Java programming language code.
Provides implementation support for building JShell execution engines.
-
Uses of BiFunction in java.lang.classfile.componentsPREVIEW
Modifier and TypeMethodDescriptionstatic CodeRelabelerPREVIEW
CodeRelabeler.of
(BiFunction<LabelPREVIEW, CodeBuilderPREVIEW, LabelPREVIEW> mapFunction) Creates a new instance of CodeRelabeler using providedBiFunction
to re-label the code. -
Uses of BiFunction in java.security
Modifier and TypeMethodDescriptionProvider.compute
(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) Attempts to compute a mapping for the specified key and its current mapped value (ornull
if there is no current mapping).Provider.computeIfPresent
(Object key, BiFunction<? super Object, ? super Object, ? extends Object> 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.Provider.merge
(Object key, Object value, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) If the specified key is not already associated with a value or is associated withnull
, associates it with the given value.void
Provider.replaceAll
(BiFunction<? super Object, ? super Object, ? extends Object> function) Replaces each entry's value with the result of invoking the given function on that entry, in the order entries are returned by an entry set iterator, until all entries have been processed or the function throws an exception. -
Uses of BiFunction in java.util
Modifier and TypeMethodDescriptionAttempts to compute a mapping for the specified key and its current mapped value, ornull
if there is no current mapping (optional operation).Attempts to compute a mapping for the specified key and its current mapped value, ornull
if there is no current mapping (optional operation).default V
Attempts to compute a mapping for the specified key and its current mapped value, ornull
if there is no current mapping (optional operation).Attempts to compute a mapping for the specified key and its current mapped value, ornull
if there is no current mapping (optional operation).HashMap.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 (optional operation).Hashtable.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 (optional operation).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 (optional operation).TreeMap.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 (optional operation).If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value (optional operation).If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value (optional operation).default V
If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value (optional operation).If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value (optional operation).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 (optional operation). -
Uses of BiFunction in java.util.concurrent
Modifier and TypeMethodDescriptionAttempts to compute a mapping for the specified key and its current mapped value (ornull
if there is no current mapping).default V
Attempts to compute a mapping for the specified key and its current mapped value, ornull
if there is no current mapping (optional operation).Attempts to compute a mapping for the specified key and its current mapped value (ornull
if there is no current mapping).ConcurrentHashMap.computeIfPresent
(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) If the value for the specified key is present, attempts to compute a new mapping given the key and its current mapped value.default V
ConcurrentMap.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 (optional operation).ConcurrentSkipListMap.computeIfPresent
(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) If the value for the specified key is present, attempts to compute a new mapping given the key and its current mapped value.<U> void
ConcurrentHashMap.forEach
(long parallelismThreshold, BiFunction<? super K, ? super V, ? extends U> transformer, Consumer<? super U> action) Performs the given action for each non-null transformation of each (key, value).<U> CompletableFuture
<U> CompletableFuture.handle
(BiFunction<? super T, Throwable, ? extends U> fn) <U> CompletionStage
<U> CompletionStage.handle
(BiFunction<? super T, Throwable, ? extends U> fn) Returns a new CompletionStage that, when this stage completes either normally or exceptionally, is executed with this stage's result and exception as arguments to the supplied function.<U> CompletableFuture
<U> CompletableFuture.handleAsync
(BiFunction<? super T, Throwable, ? extends U> fn) <U> CompletableFuture
<U> CompletableFuture.handleAsync
(BiFunction<? super T, Throwable, ? extends U> fn, Executor executor) <U> CompletionStage
<U> CompletionStage.handleAsync
(BiFunction<? super T, Throwable, ? extends U> fn) Returns a new CompletionStage that, when this stage completes either normally or exceptionally, is executed using this stage's default asynchronous execution facility, with this stage's result and exception as arguments to the supplied function.<U> CompletionStage
<U> CompletionStage.handleAsync
(BiFunction<? super T, Throwable, ? extends U> fn, Executor executor) Returns a new CompletionStage that, when this stage completes either normally or exceptionally, is executed using the supplied executor, with this stage's result and exception as arguments to the supplied function.ConcurrentHashMap.merge
(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) If the specified key is not already associated with a (non-null) value, associates it with the given value.default V
If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value (optional operation).ConcurrentSkipListMap.merge
(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) If the specified key is not already associated with a value, associates it with the given value.<U> U
ConcurrentHashMap.reduce
(long parallelismThreshold, BiFunction<? super K, ? super V, ? extends U> transformer, BiFunction<? super U, ? super U, ? extends U> reducer) Returns the result of accumulating the given transformation of all (key, value) pairs using the given reducer to combine values, or null if none.ConcurrentHashMap.reduceEntries
(long parallelismThreshold, BiFunction<Map.Entry<K, V>, Map.Entry<K, V>, ? extends Map.Entry<K, V>> reducer) Returns the result of accumulating all entries using the given reducer to combine values, or null if none.<U> U
ConcurrentHashMap.reduceEntries
(long parallelismThreshold, Function<Map.Entry<K, V>, ? extends U> transformer, BiFunction<? super U, ? super U, ? extends U> reducer) Returns the result of accumulating the given transformation of all entries using the given reducer to combine values, or null if none.ConcurrentHashMap.reduceKeys
(long parallelismThreshold, BiFunction<? super K, ? super K, ? extends K> reducer) Returns the result of accumulating all keys using the given reducer to combine values, or null if none.<U> U
ConcurrentHashMap.reduceKeys
(long parallelismThreshold, Function<? super K, ? extends U> transformer, BiFunction<? super U, ? super U, ? extends U> reducer) Returns the result of accumulating the given transformation of all keys using the given reducer to combine values, or null if none.ConcurrentHashMap.reduceValues
(long parallelismThreshold, BiFunction<? super V, ? super V, ? extends V> reducer) Returns the result of accumulating all values using the given reducer to combine values, or null if none.<U> U
ConcurrentHashMap.reduceValues
(long parallelismThreshold, Function<? super V, ? extends U> transformer, BiFunction<? super U, ? super U, ? extends U> reducer) Returns the result of accumulating the given transformation of all values using the given reducer to combine values, or null if none.default void
ConcurrentMap.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 (optional operation).<U> U
ConcurrentHashMap.search
(long parallelismThreshold, BiFunction<? super K, ? super V, ? extends U> searchFunction) Returns a non-null result from applying the given search function on each (key, value), or null if none.<U,
V> CompletableFuture <V> CompletableFuture.thenCombine
(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn) <U,
V> CompletionStage <V> CompletionStage.thenCombine
(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn) Returns a new CompletionStage that, when this and the other given stage both complete normally, is executed with the two results as arguments to the supplied function.<U,
V> CompletableFuture <V> CompletableFuture.thenCombineAsync
(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn) <U,
V> CompletableFuture <V> CompletableFuture.thenCombineAsync
(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn, Executor executor) <U,
V> CompletionStage <V> CompletionStage.thenCombineAsync
(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn) Returns a new CompletionStage that, when this and the other given stage both complete normally, is executed using this stage's default asynchronous execution facility, with the two results as arguments to the supplied function.<U,
V> CompletionStage <V> CompletionStage.thenCombineAsync
(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn, Executor executor) Returns a new CompletionStage that, when this and the other given stage both complete normally, is executed using the supplied executor, with the two results as arguments to the supplied function. -
Uses of BiFunction in java.util.function
Modifier and TypeInterfaceDescriptioninterface
Represents an operation upon two operands of the same type, producing a result of the same type as the operands. -
Uses of BiFunction in java.util.logging
Modifier and TypeMethodDescriptionvoid
LogManager.updateConfiguration
(InputStream ins, Function<String, BiFunction<String, String, String>> mapper) Updates the logging configuration.void
LogManager.updateConfiguration
(Function<String, BiFunction<String, String, String>> mapper) Updates the logging configuration. -
Uses of BiFunction in java.util.stream
Modifier and TypeMethodDescriptionGatherers.fold
(Supplier<R> initial, BiFunction<? super R, ? super T, ? extends R> folder) Returns a Gatherer that performs an ordered, reduction-like, transformation for scenarios where no combiner-function can be implemented, or for reductions which are intrinsically order-dependent.<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.Gatherers.scan
(Supplier<R> initial, BiFunction<? super R, ? super T, ? extends R> scanner) Returns a Gatherer that performs a Prefix Scan -- an incremental accumulation -- using the provided functions.static <T,
R1, R2, R>
Collector<T, ?, R> Collectors.teeing
(Collector<? super T, ?, R1> downstream1, Collector<? super T, ?, R2> downstream2, BiFunction<? super R1, ? super R2, R> merger) Returns aCollector
that is a composite of two downstream collectors. -
Uses of BiFunction in javax.net.ssl
Modifier and TypeMethodDescriptionSSLEngine.getHandshakeApplicationProtocolSelector()
Retrieves the callback function that selects an application protocol value during a SSL/TLS/DTLS handshake.SSLSocket.getHandshakeApplicationProtocolSelector()
Retrieves the callback function that selects an application protocol value during a SSL/TLS/DTLS handshake.Modifier and TypeMethodDescriptionvoid
SSLEngine.setHandshakeApplicationProtocolSelector
(BiFunction<SSLEngine, List<String>, String> selector) Registers a callback function that selects an application protocol value for a SSL/TLS/DTLS handshake.void
SSLSocket.setHandshakeApplicationProtocolSelector
(BiFunction<SSLSocket, List<String>, String> selector) Registers a callback function that selects an application protocol value for a SSL/TLS/DTLS handshake. -
Uses of BiFunction in jdk.jshell
Modifier and TypeMethodDescriptionJShell.Builder.idGenerator
(BiFunction<Snippet, Integer, String> generator) Sets the generator of identifying names for Snippets. -
Uses of BiFunction in jdk.jshell.execution
Modifier and TypeMethodDescriptionstatic ExecutionControl
Util.remoteInputOutput
(InputStream input, OutputStream output, Map<String, OutputStream> outputStreamMap, Map<String, InputStream> inputStreamMap, BiFunction<ObjectInput, ObjectOutput, ExecutionControl> factory) Creates an ExecutionControl for given packetized input and output.