public class FunctionalUtils extends Object
| Constructor and Description |
|---|
FunctionalUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> V |
computeIfAbsent(Map<K,V> map,
K key,
Function<K,V> mappingFunction)
Use this method instead if
Map.computeIfAbsent(Object, Function) when the mapping functions are recursive and/or
will end up accessing the same map again. |
public static <K,V> V computeIfAbsent(Map<K,V> map, K key, Function<K,V> mappingFunction)
Map.computeIfAbsent(Object, Function) when the mapping functions are recursive and/or
will end up accessing the same map again. This is necessary because starting with JDK9
Map.computeIfAbsent(Object, Function) throws ConcurrentModificationException if used in concurrent,
recursive, or nested fashion.Copyright © 2022 MuleSoft, Inc.. All rights reserved.