K - Class of the key for the map.V - Class of the value for the map.public final class ImmutableMap<K,V> extends Object implements Map<K,V>
Example of using map Builder:
 {
     @code
     Map<String, AttibuteValue> item = new ImmutableMap.Builder<String, AttibuteValue>()
             .put("one", new AttibuteValue("1"))
             .put("two", new AttibuteValue("2"))
             .put("three", new AttibuteValue("3")).build();
 }
 
 For small immutable maps (up to five entries), the
 ImmutableMapParamter.of() methods are preferred:
 
 
   Map<String, AttibuteValue> item =
       ImmutableMap
           .of("one", new AttributeValue("1"),
               "two", new AttributeValue("2"),
               "three", new AttributeValue("3"), 
 
 | Modifier and Type | Class and Description | 
|---|---|
| static class  | ImmutableMap.Builder<K,V>A convenient builder for creating ImmutableMap instances. | 
| Modifier and Type | Method and Description | 
|---|---|
| static <K,V> ImmutableMap.Builder<K,V> | builder()Returns a new MapParameterBuilder instance. | 
| void | clear()Unsupported methods | 
| boolean | containsKey(Object key)Inherited methods | 
| boolean | containsValue(Object value) | 
| Set<Map.Entry<K,V>> | entrySet() | 
| boolean | equals(Object o) | 
| V | get(Object key) | 
| int | hashCode() | 
| boolean | isEmpty() | 
| Set<K> | keySet() | 
| static <K,V> ImmutableMap<K,V> | of(K k0,
  V v0)Returns an ImmutableMap instance containing a single entry. | 
| static <K,V> ImmutableMap<K,V> | of(K k0,
  V v0,
  K k1,
  V v1)Returns an ImmutableMap instance containing two entries. | 
| static <K,V> ImmutableMap<K,V> | of(K k0,
  V v0,
  K k1,
  V v1,
  K k2,
  V v2)Returns an ImmutableMap instance containing three entries. | 
| static <K,V> ImmutableMap<K,V> | of(K k0,
  V v0,
  K k1,
  V v1,
  K k2,
  V v2,
  K k3,
  V v3)Returns an ImmutableMap instance containing four entries. | 
| static <K,V> ImmutableMap<K,V> | of(K k0,
  V v0,
  K k1,
  V v1,
  K k2,
  V v2,
  K k3,
  V v3,
  K k4,
  V v4)Returns an ImmutableMap instance containing five entries. | 
| V | put(K key,
   V value) | 
| void | putAll(Map<? extends K,? extends V> map) | 
| V | remove(Object key) | 
| int | size() | 
| String | toString() | 
| Collection<V> | values() | 
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic static <K,V> ImmutableMap.Builder<K,V> builder()
public static <K,V> ImmutableMap<K,V> of(K k0, V v0)
k0 - Key of the single entry.v0 - Value of the single entry.public static <K,V> ImmutableMap<K,V> of(K k0, V v0, K k1, V v1)
k0 - Key of the first entry.v0 - Value of the first entry.k1 - Key of the second entry.v1 - Value of the second entry.public static <K,V> ImmutableMap<K,V> of(K k0, V v0, K k1, V v1, K k2, V v2)
k0 - Key of the first entry.v0 - Value of the first entry.k1 - Key of the second entry.v1 - Value of the second entry.k2 - Key of the third entry.v2 - Value of the third entry.public static <K,V> ImmutableMap<K,V> of(K k0, V v0, K k1, V v1, K k2, V v2, K k3, V v3)
k0 - Key of the first entry.v0 - Value of the first entry.k1 - Key of the second entry.v1 - Value of the second entry.k2 - Key of the third entry.v2 - Value of the third entry.k3 - Key of the fourth entry.v3 - Value of the fourth entry.public static <K,V> ImmutableMap<K,V> of(K k0, V v0, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
k0 - Key of the first entry.v0 - Value of the first entry.k1 - Key of the second entry.v1 - Value of the second entry.k2 - Key of the third entry.v2 - Value of the third entry.k3 - Key of the fourth entry.v3 - Value of the fourth entry.k4 - Key of the fifth entry.v4 - Value of the fifth entry.public boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>public boolean equals(Object o)
public int hashCode()
Copyright © 2020. All rights reserved.