Class MapUtil


  • public class MapUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private MapUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <K,​V>
      V
      computeIfAbsent​(java.util.Map<K,​V> map, K key, java.util.function.Function<K,​V> mappingFunction)
      A temporary workaround for Java 8 specific performance issue JDK-8161372 .
      This class should be removed once we drop Java 8 support.
      static <K,​V>
      java.util.Map.Entry<K,​V>
      entry​(K key, V value)
      Map.entry(key, value) alternative for Java 8.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapUtil

        private MapUtil()
    • Method Detail

      • computeIfAbsent

        public static <K,​V> V computeIfAbsent​(java.util.Map<K,​V> map,
                                                    K key,
                                                    java.util.function.Function<K,​V> mappingFunction)
        A temporary workaround for Java 8 specific performance issue JDK-8161372 .
        This class should be removed once we drop Java 8 support.
        See Also:
        https://bugs.openjdk.java.net/browse/JDK-8161372
      • entry

        public static <K,​V> java.util.Map.Entry<K,​V> entry​(K key,
                                                                       V value)
        Map.entry(key, value) alternative for Java 8.