Class Maps


  • public final class Maps
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Maps()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <K,​V>
      java.util.concurrent.ConcurrentHashMap<K,​V>
      newConcurrentHashMap()  
      static <K,​V>
      java.util.concurrent.ConcurrentHashMap<K,​V>
      newConcurrentHashMap​(int initialSize)  
      static <K,​V>
      java.util.concurrent.ConcurrentHashMap<K,​V>
      newConcurrentHashMap​(java.util.Map<K,​V> map)  
      static <K,​V>
      java.util.concurrent.ConcurrentSkipListMap<K,​V>
      newConcurrentSkipListMap()  
      static <K,​V>
      java.util.concurrent.ConcurrentSkipListMap<K,​V>
      newConcurrentSkipListMap​(java.util.Map<K,​V> map)  
      static <K extends java.lang.Enum<K>,​V>
      java.util.EnumMap<K,​V>
      newEnumMap​(java.lang.Class<K> clazz)  
      static <K,​V>
      java.util.HashMap<K,​V>
      newHashMap()  
      static <K,​V>
      java.util.HashMap<K,​V>
      newHashMap​(int initialSize)  
      static <K,​V>
      java.util.HashMap<K,​V>
      newHashMap​(java.util.Map<K,​V> map)  
      static <K,​V>
      java.util.IdentityHashMap<K,​V>
      newIdentityHashMap()  
      static <K,​V>
      java.util.IdentityHashMap<K,​V>
      newIdentityHashMap​(int initialSize)  
      static <K,​V>
      java.util.IdentityHashMap<K,​V>
      newIdentityHashMap​(java.util.Map<K,​V> map)  
      static <K,​V>
      java.util.LinkedHashMap<K,​V>
      newLinkedHashMap()  
      static <K,​V>
      java.util.LinkedHashMap<K,​V>
      newLinkedHashMap​(int initialSize)  
      static <K,​V>
      java.util.LinkedHashMap<K,​V>
      newLinkedHashMap​(java.util.Map<K,​V> map)  
      static <K,​V>
      java.util.Map<K,​V>
      newMapByKeys​(java.util.Collection<K> collection, java.util.function.Function<K,​V> function)  
      static <K,​V>
      java.util.Map<K,​V>
      newMapByValues​(java.util.Collection<V> collection, java.util.function.Function<V,​K> function)  
      static <K,​V>
      java.util.TreeMap<K,​V>
      newTreeMap()  
      static <K,​V>
      java.util.TreeMap<K,​V>
      newTreeMap​(java.util.Map<K,​V> map)  
      static <K,​V>
      java.util.WeakHashMap<K,​V>
      newWeakHashMap()  
      static <K,​V>
      java.util.WeakHashMap<K,​V>
      newWeakHashMap​(int capacity)  
      static <K,​V>
      java.util.WeakHashMap<K,​V>
      newWeakHashMap​(java.util.Map<K,​V> map)  
      static <K,​V>
      java.util.Map<K,​V>
      of​(Pair<K,​V>... pairs)  
      • Methods inherited from class java.lang.Object

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

      • Maps

        private Maps()
    • Method Detail

      • newHashMap

        public static <K,​V> java.util.HashMap<K,​V> newHashMap()
      • newHashMap

        public static <K,​V> java.util.HashMap<K,​V> newHashMap​(int initialSize)
      • newHashMap

        public static <K,​V> java.util.HashMap<K,​V> newHashMap​(java.util.Map<K,​V> map)
      • newConcurrentHashMap

        public static <K,​V> java.util.concurrent.ConcurrentHashMap<K,​V> newConcurrentHashMap()
      • newConcurrentHashMap

        public static <K,​V> java.util.concurrent.ConcurrentHashMap<K,​V> newConcurrentHashMap​(int initialSize)
      • newConcurrentHashMap

        public static <K,​V> java.util.concurrent.ConcurrentHashMap<K,​V> newConcurrentHashMap​(java.util.Map<K,​V> map)
      • newLinkedHashMap

        public static <K,​V> java.util.LinkedHashMap<K,​V> newLinkedHashMap()
      • newLinkedHashMap

        public static <K,​V> java.util.LinkedHashMap<K,​V> newLinkedHashMap​(int initialSize)
      • newLinkedHashMap

        public static <K,​V> java.util.LinkedHashMap<K,​V> newLinkedHashMap​(java.util.Map<K,​V> map)
      • newConcurrentSkipListMap

        public static <K,​V> java.util.concurrent.ConcurrentSkipListMap<K,​V> newConcurrentSkipListMap()
      • newConcurrentSkipListMap

        public static <K,​V> java.util.concurrent.ConcurrentSkipListMap<K,​V> newConcurrentSkipListMap​(java.util.Map<K,​V> map)
      • newWeakHashMap

        public static <K,​V> java.util.WeakHashMap<K,​V> newWeakHashMap()
      • newWeakHashMap

        public static <K,​V> java.util.WeakHashMap<K,​V> newWeakHashMap​(int capacity)
      • newWeakHashMap

        public static <K,​V> java.util.WeakHashMap<K,​V> newWeakHashMap​(java.util.Map<K,​V> map)
      • newIdentityHashMap

        public static <K,​V> java.util.IdentityHashMap<K,​V> newIdentityHashMap()
      • newIdentityHashMap

        public static <K,​V> java.util.IdentityHashMap<K,​V> newIdentityHashMap​(int initialSize)
      • newIdentityHashMap

        public static <K,​V> java.util.IdentityHashMap<K,​V> newIdentityHashMap​(java.util.Map<K,​V> map)
      • newTreeMap

        public static <K,​V> java.util.TreeMap<K,​V> newTreeMap()
      • newTreeMap

        public static <K,​V> java.util.TreeMap<K,​V> newTreeMap​(java.util.Map<K,​V> map)
      • newEnumMap

        public static <K extends java.lang.Enum<K>,​V> java.util.EnumMap<K,​V> newEnumMap​(java.lang.Class<K> clazz)
      • newMapByValues

        public static <K,​V> java.util.Map<K,​V> newMapByValues​(java.util.Collection<V> collection,
                                                                          java.util.function.Function<V,​K> function)
      • newMapByKeys

        public static <K,​V> java.util.Map<K,​V> newMapByKeys​(java.util.Collection<K> collection,
                                                                        java.util.function.Function<K,​V> function)
      • of

        public static <K,​V> java.util.Map<K,​V> of​(Pair<K,​V>... pairs)