接口的使用
java.util.function.BiFunction
使用 BiFunction 的包
包
描述
为安全框架提供类和接口。
包含集合框架、一些国际化支持类、服务加载器、属性、随机数生成、字符串解析和扫描类、base64 编码和解码、位数组和几个杂项实用程序类。
通常在并发编程中有用的实用程序类。
Functional interfaces 为 lambda 表达式和方法引用提供目标类型。
提供 Java 2 平台的核心日志记录工具的类和接口。
支持对元素流进行函数式操作的类,例如对集合的 map-reduce 转换。
为安全套接字包提供类。
提供用于创建工具的接口,例如 Read-Eval-Print Loop (REPL),它以交互方式评估 Java 编程语言代码的“片段”。
为构建 JShell 执行引擎提供实现支持。
-
BiFunction 在 java.security 中的用法
java.security 中的方法,参数类型为 BiFunction修饰符和类型方法描述Provider.compute(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) 尝试计算指定键及其当前映射值的映射(如果没有当前映射,则为null)。Provider.computeIfPresent(Object key, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) 如果指定键的值存在且非空,则尝试在给定键及其当前映射值的情况下计算新映射。Provider.merge(Object key, Object value, BiFunction<? super Object, ? super Object, ? extends Object> remappingFunction) 如果指定的键尚未与值关联或与null关联,则将其与给定值关联。voidProvider.replaceAll(BiFunction<? super Object, ? super Object, ? extends Object> function) 将每个条目的值替换为对该条目调用给定函数的结果,按照条目集迭代器返回条目的顺序,直到处理完所有条目或函数抛出异常。 -
BiFunction 在 java.util 中的用法
java.util 中的方法,参数类型为 BiFunction修饰符和类型方法描述尝试计算指定键及其当前映射值的映射(如果没有当前映射,则为null)。尝试计算指定键及其当前映射值的映射(如果没有当前映射,则为null)。default V尝试计算指定键及其当前映射值的映射(如果没有当前映射,则为null)。尝试计算指定键及其当前映射值的映射(如果没有当前映射,则为null)。HashMap.computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) 如果指定键的值存在且非空,则尝试在给定键及其当前映射值的情况下计算新映射。Hashtable.computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) 如果指定键的值存在且非空,则尝试在给定键及其当前映射值的情况下计算新映射。default VMap.computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) 如果指定键的值存在且非空,则尝试在给定键及其当前映射值的情况下计算新映射。TreeMap.computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) 如果指定键的值存在且非空,则尝试在给定键及其当前映射值的情况下计算新映射。如果指定的键尚未与值关联或与 null 关联,则将其与给定的非 null 值关联。如果指定的键尚未与值关联或与 null 关联,则将其与给定的非 null 值关联。default V如果指定的键尚未与值关联或与 null 关联,则将其与给定的非 null 值关联。如果指定的键尚未与值关联或与 null 关联,则将其与给定的非 null 值关联。default voidMap.replaceAll(BiFunction<? super K, ? super V, ? extends V> function) 将每个条目的值替换为对该条目调用给定函数的结果,直到处理完所有条目或函数抛出异常。 -
BiFunction 在 java.util.concurrent 中的用法
java.util.concurrent 中的方法,参数类型为 BiFunction修饰符和类型方法描述尝试计算指定键及其当前映射值的映射(如果没有当前映射,则为null)。default V尝试计算指定键及其当前映射值的映射(如果没有当前映射,则为null)。尝试计算指定键及其当前映射值的映射(如果没有当前映射,则为null)。ConcurrentHashMap.computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) 如果存在指定键的值,则尝试在给定键及其当前映射值的情况下计算新映射。default VConcurrentMap.computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) 如果指定键的值存在且非空,则尝试在给定键及其当前映射值的情况下计算新映射。ConcurrentSkipListMap.computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) 如果存在指定键的值,则尝试在给定键及其当前映射值的情况下计算新映射。<U> voidConcurrentHashMap.forEach(long parallelismThreshold, BiFunction<? super K, ? super V, ? extends U> transformer, Consumer<? super U> action) 对每个(键,值)的每个非空转换执行给定的操作。<U> CompletableFuture<U>CompletableFuture.handle(BiFunction<? super T, Throwable, ? extends U> fn) <U> CompletionStage<U>CompletionStage.handle(BiFunction<? super T, Throwable, ? extends U> fn) 返回一个新的 CompletionStage,当此阶段正常或异常完成时,将使用此阶段的结果和异常作为所提供函数的参数执行。<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) 返回一个新的 CompletionStage,当这个阶段正常或异常完成时,使用这个阶段的默认异步执行工具执行,这个阶段的结果和异常作为提供函数的参数。<U> CompletionStage<U>CompletionStage.handleAsync(BiFunction<? super T, Throwable, ? extends U> fn, Executor executor) 返回一个新的 CompletionStage,当此阶段正常或异常完成时,使用提供的执行程序执行该阶段的结果和异常作为提供函数的参数。ConcurrentHashMap.merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) 如果指定键尚未与(非空)值关联,则将其与给定值关联。default V如果指定的键尚未与值关联或与 null 关联,则将其与给定的非 null 值关联。ConcurrentSkipListMap.merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) 如果指定的键尚未与值关联,则将其与给定值关联。<U> UConcurrentHashMap.reduce(long parallelismThreshold, BiFunction<? super K, ? super V, ? extends U> transformer, BiFunction<? super U, ? super U, ? extends U> reducer) 返回使用给定的 reducer 组合值来累积所有 (key, value) 对的给定转换的结果,如果没有则返回 null。ConcurrentHashMap.reduceEntries(long parallelismThreshold, BiFunction<Map.Entry<K, V>, Map.Entry<K, V>, ? extends Map.Entry<K, V>> reducer) 返回使用给定的 reducer 组合值来累积所有条目的结果,如果没有则返回 null。<U> UConcurrentHashMap.reduceEntries(long parallelismThreshold, Function<Map.Entry<K, V>, ? extends U> transformer, BiFunction<? super U, ? super U, ? extends U> reducer) 返回使用给定的 reducer 组合值的所有条目的给定转换的累积结果,如果没有则返回 null。ConcurrentHashMap.reduceKeys(long parallelismThreshold, BiFunction<? super K, ? super K, ? extends K> reducer) 返回使用给定的缩减器累积所有键以组合值的结果,如果没有则返回 null。<U> UConcurrentHashMap.reduceKeys(long parallelismThreshold, Function<? super K, ? extends U> transformer, BiFunction<? super U, ? super U, ? extends U> reducer) 返回使用给定的 reducer 组合值来累积所有键的给定转换的结果,如果没有则返回 null。ConcurrentHashMap.reduceValues(long parallelismThreshold, BiFunction<? super V, ? super V, ? extends V> reducer) 返回使用给定的 reducer 组合值来累积所有值的结果,如果没有则返回 null。<U> UConcurrentHashMap.reduceValues(long parallelismThreshold, Function<? super V, ? extends U> transformer, BiFunction<? super U, ? super U, ? extends U> reducer) 返回使用给定的 reducer 组合值来累积所有值的给定转换的结果,如果没有则返回 null。default voidConcurrentMap.replaceAll(BiFunction<? super K, ? super V, ? extends V> function) 将每个条目的值替换为对该条目调用给定函数的结果,直到处理完所有条目或函数抛出异常。<U> UConcurrentHashMap.search(long parallelismThreshold, BiFunction<? super K, ? super V, ? extends U> searchFunction) 通过对每个 (key, value) 应用给定的搜索函数返回一个非空结果,如果没有则返回 null。<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) 返回一个新的 CompletionStage,当这个阶段和另一个给定阶段都正常完成时,将以两个结果作为所提供函数的参数来执行。<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) 返回一个新的 CompletionStage,当这个和另一个给定阶段都正常完成时,使用这个阶段的默认异步执行工具执行,两个结果作为提供函数的参数。<U,V> CompletionStage<V> CompletionStage.thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn, Executor executor) 返回一个新的 CompletionStage,当这个和另一个给定阶段都正常完成时,使用提供的执行器执行,两个结果作为提供函数的参数。 -
BiFunction 在 java.util.function 中的用法
java.util.function 中 BiFunction 的子接口java.util.function 中返回 BiFunction 的方法 -
BiFunction 在 java.util.logging 中的用法
java.util.logging 中的方法参数,类型参数为 BiFunction修饰符和类型方法描述voidLogManager.updateConfiguration(InputStream ins, Function<String, BiFunction<String, String, String>> mapper) 更新日志记录配置。voidLogManager.updateConfiguration(Function<String, BiFunction<String, String, String>> mapper) 更新日志记录配置。 -
BiFunction 在 java.util.stream 中的用法
java.util.stream 中的方法,参数类型为 BiFunction修饰符和类型方法描述<U> UStream.reduce(U identity, BiFunction<U, ? super T, U> accumulator, BinaryOperator<U> combiner) 使用提供的标识、累积和组合函数对此流的元素执行 减少。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) 返回一个Collector,它是两个下游收集器的组合。 -
BiFunction 在 javax.net.ssl 中的用法
javax.net.ssl 中返回 BiFunction 的方法修饰符和类型方法描述SSLEngine.getHandshakeApplicationProtocolSelector()检索在 SSL/TLS/DTLS 握手期间选择应用程序协议值的回调函数。SSLSocket.getHandshakeApplicationProtocolSelector()检索在 SSL/TLS/DTLS 握手期间选择应用程序协议值的回调函数。javax.net.ssl 中的方法,参数类型为 BiFunction修饰符和类型方法描述voidSSLEngine.setHandshakeApplicationProtocolSelector(BiFunction<SSLEngine, List<String>, String> selector) 注册一个回调函数,该函数为 SSL/TLS/DTLS 握手选择应用程序协议值。voidSSLSocket.setHandshakeApplicationProtocolSelector(BiFunction<SSLSocket, List<String>, String> selector) 注册一个回调函数,该函数为 SSL/TLS/DTLS 握手选择应用程序协议值。 -
BiFunction 在 jdk.jshell 中的用法
jdk.jshell 中的方法,参数类型为 BiFunction -
BiFunction 在 jdk.jshell.execution 中的用法
jdk.jshell.execution 中的方法,参数类型为 BiFunction修饰符和类型方法描述static ExecutionControlUtil.remoteInputOutput(InputStream input, OutputStream output, Map<String, OutputStream> outputStreamMap, Map<String, InputStream> inputStreamMap, BiFunction<ObjectInput, ObjectOutput, ExecutionControl> factory) 为给定的打包输入和输出创建一个 ExecutionControl。