| Constructor and Description |
|---|
MiniMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Modifying operation - not allowed.
|
static <KK,VV> ImmutableMapEntry<KK,VV> |
entry(KK key,
VV value)
Create an
ImmutableMapEntry. |
boolean |
equals(Object other)
Compares the specified object with this map for equality.
|
int |
hashCode()
Returns the hash code value for this map.
|
static <KK,VV> Map<KK,VV> |
map(KK key,
VV value)
Create a
MiniMap to map a single key to a nominated value. |
static <KK,VV> Map<KK,VV> |
map(KK key0,
VV value0,
KK key1,
VV value1)
Create a
MiniMap to map two keys to two nominated values. |
static <KK,VV> Map<KK,VV> |
map(KK key0,
VV value0,
KK key1,
VV value1,
KK key2,
VV value2)
Create a
MiniMap to map three keys to three nominated values. |
static <KK,VV> Map<KK,VV> |
of()
Create an empty
MiniMap. |
static <KK,VV> Map<KK,VV> |
of(Map.Entry<KK,VV>... entries)
Create a
MiniMap with a variable number of Map.Entrys. |
static <KK,VV> Map<KK,VV> |
of(Map.Entry<KK,VV> entry)
Create a
MiniMap with a single Map.Entry. |
static <KK,VV> Map<KK,VV> |
of(Map.Entry<KK,VV> entry0,
Map.Entry<KK,VV> entry1)
Create a
MiniMap with two Map.Entrys. |
static <KK,VV> Map<KK,VV> |
of(Map.Entry<KK,VV> entry0,
Map.Entry<KK,VV> entry1,
Map.Entry<KK,VV> entry2)
Create a
MiniMap with three Map.Entrys. |
V |
put(K key,
V value)
Modifying operation - not allowed.
|
void |
putAll(Map<? extends K,? extends V> m)
Modifying operation - not allowed.
|
V |
remove(Object key)
Modifying operation - not allowed.
|
protected String |
stringOf(Object obj)
Return a string representation of the supplied key or value, guarding against possible recursion.
|
String |
toString()
Returns a string representation of this map.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, valuespublic void clear()
clear in interface Map<K,V>UnsupportedOperationException - (in all cases)public V put(K key, V value)
put in interface Map<K,V>UnsupportedOperationException - (in all cases)public V remove(Object key)
remove in interface Map<K,V>UnsupportedOperationException - (in all cases)public void putAll(Map<? extends K,? extends V> m)
putAll in interface Map<K,V>UnsupportedOperationException - (in all cases)public boolean equals(Object other)
true if the given object is also a
map, the maps contains the same number of entries and for each key in one map, the values returned by both maps
are equal (either both are null, or they compare as equal using Object.equals(java.lang.Object)). This ensures
that the equals method works properly across different implementations of the Map interface.public int hashCode()
entrySet() view. This ensures that m1.equals(m2) implies that
m1.hashCode() == m2.hashCode() for any two maps m1 and m2, as required by the general
contract of Object.hashCode().public String toString()
String.valueOf(Object).protected String stringOf(Object obj)
obj - the objectpublic static <KK,VV> ImmutableMapEntry<KK,VV> entry(KK key, VV value)
ImmutableMapEntry.KK - the key typeVV - the value typekey - the keyvalue - the valueImmutableMapEntrypublic static <KK,VV> Map<KK,VV> map(KK key, VV value)
MiniMap to map a single key to a nominated value.KK - the key typeVV - the value typekey - the keyvalue - the valueMiniMappublic static <KK,VV> Map<KK,VV> map(KK key0, VV value0, KK key1, VV value1)
MiniMap to map two keys to two nominated values.KK - the key typeVV - the value typekey0 - the first keyvalue0 - the first valuekey1 - the second keyvalue1 - the second valueMiniMappublic static <KK,VV> Map<KK,VV> map(KK key0, VV value0, KK key1, VV value1, KK key2, VV value2)
MiniMap to map three keys to three nominated values.KK - the key typeVV - the value typekey0 - the first keyvalue0 - the first valuekey1 - the second keyvalue1 - the second valuekey2 - the third keyvalue2 - the third valueMiniMappublic static <KK,VV> Map<KK,VV> of()
MiniMap.KK - the key typeVV - the value typeMiniMappublic static <KK,VV> Map<KK,VV> of(Map.Entry<KK,VV> entry)
MiniMap with a single Map.Entry.KK - the key typeVV - the value typeentry - the entryMiniMappublic static <KK,VV> Map<KK,VV> of(Map.Entry<KK,VV> entry0, Map.Entry<KK,VV> entry1)
MiniMap with two Map.Entrys.KK - the key typeVV - the value typeentry0 - the first entryentry1 - the second entryMiniMappublic static <KK,VV> Map<KK,VV> of(Map.Entry<KK,VV> entry0, Map.Entry<KK,VV> entry1, Map.Entry<KK,VV> entry2)
MiniMap with three Map.Entrys.KK - the key typeVV - the value typeentry0 - the first entryentry1 - the second entryentry2 - the third entryMiniMap@SafeVarargs public static <KK,VV> Map<KK,VV> of(Map.Entry<KK,VV>... entries)
MiniMap with a variable number of Map.Entrys.KK - the key typeVV - the value typeentries - the first entriesMiniMapCopyright © 2022. All rights reserved.