Java™ Platform
Standard Ed. 8

Uses of Interface
java.util.function.BiFunction

  • Packages that use BiFunction 
    Package Description
    java.security
    Provides the classes and interfaces for the security framework.
    java.util
    Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
    java.util.concurrent
    Utility classes commonly useful in concurrent programming.
    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.
    javax.net.ssl
    Provides classes for the secure socket package.
    • Uses of BiFunction in java.security

      Methods in java.security with parameters of type BiFunction 
      Modifier and Type Method and Description
      Object Provider.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 (or null if there is no current mapping).
      Object 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.
      Object 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 with null, 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

      Methods in java.util with parameters of type BiFunction 
      Modifier and Type Method and Description
      V Hashtable.compute(K key, BiFunction<? super K,? super V,? extends V> remappingFunction) 
      V HashMap.compute(K key, BiFunction<? super K,? super V,? extends V> remappingFunction) 
      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).
      V Hashtable.computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction) 
      V HashMap.computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction) 
      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.
      V Hashtable.merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction) 
      V HashMap.merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction) 
      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.
      void IdentityHashMap.replaceAll(BiFunction<? super K,? super V,? extends V> function) 
      void TreeMap.replaceAll(BiFunction<? super K,? super V,? extends V> function) 
      void LinkedHashMap.replaceAll(BiFunction<? super K,? super V,? extends V> function) 
      void Hashtable.replaceAll(BiFunction<? super K,? super V,? extends V> function) 
      void HashMap.replaceAll(BiFunction<? super K,? super V,? extends V> function) 
      void WeakHashMap.replaceAll(BiFunction<? super K,? super V,? extends V> function) 
      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.concurrent

      Methods in java.util.concurrent with parameters of type BiFunction 
      Modifier and Type Method and Description
      V ConcurrentSkipListMap.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).
      V ConcurrentHashMap.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 ConcurrentMap.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).
      V 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.
      V 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.
      <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> 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> 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, 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.
      V 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.
      V 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 ConcurrentMap.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.
      <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.
      <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.
      Map.Entry<K,V> 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.
      K 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.
      V 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.
      void ConcurrentSkipListMap.replaceAll(BiFunction<? super K,? super V,? extends V> function) 
      void ConcurrentHashMap.replaceAll(BiFunction<? super K,? super V,? extends V> function) 
      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.
      <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> 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 complete normally, is executed using this stage's default asynchronous execution facility, 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, Executor executor) 
      <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 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

      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.
    • Uses of BiFunction in javax.net.ssl

      Methods in javax.net.ssl that return BiFunction 
      Modifier and Type Method and Description
      BiFunction<SSLSocket,List<String>,String> SSLSocket.getHandshakeApplicationProtocolSelector()
      Retrieves the callback function that selects an application protocol value during a SSL/TLS/DTLS handshake.
      BiFunction<SSLEngine,List<String>,String> SSLEngine.getHandshakeApplicationProtocolSelector()
      Retrieves the callback function that selects an application protocol value during a SSL/TLS/DTLS handshake.
      Methods in javax.net.ssl with parameters of type BiFunction 
      Modifier and Type Method and Description
      void 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.
Java™ Platform
Standard Ed. 8

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

微信小程序

微信扫一扫体验

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部