Class ImmutableMap<K,​V>

  • All Implemented Interfaces:
    java.util.Map<K,​V>

    public class ImmutableMap<K,​V>
    extends java.util.AbstractMap<K,​V>
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ImmutableMap​(java.util.Map.Entry<K,​V>[] entries)  
      protected ImmutableMap​(java.util.Map<K,​V> map)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.util.Map.Entry<K,​V>> entrySet()  
      V get​(java.lang.Object key)  
      static <K,​V>
      ImmutableMap<K,​V>
      newInstance​(java.util.Map.Entry<K,​V>... entries)  
      static <K,​V>
      ImmutableMap<K,​V>
      newInstance​(java.util.Map<K,​V> entries)  
      • Methods inherited from class java.util.AbstractMap

        clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • ImmutableMap

        protected ImmutableMap​(java.util.Map.Entry<K,​V>[] entries)
      • ImmutableMap

        protected ImmutableMap​(java.util.Map<K,​V> map)
    • Method Detail

      • newInstance

        public static <K,​V> ImmutableMap<K,​V> newInstance​(java.util.Map.Entry<K,​V>... entries)
      • newInstance

        public static <K,​V> ImmutableMap<K,​V> newInstance​(java.util.Map<K,​V> entries)
      • get

        public V get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<K,​V>
        Overrides:
        get in class java.util.AbstractMap<K,​V>
      • entrySet

        public java.util.Set<java.util.Map.Entry<K,​V>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<K,​V>
        Specified by:
        entrySet in class java.util.AbstractMap<K,​V>