Class AbstractSpecialisedImmutableMap<K,V>
- java.lang.Object
-
- io.usethesource.capsule.util.collection.AbstractSpecialisedImmutableMap<K,V>
-
- All Implemented Interfaces:
Map<K,V>,Map.Immutable<K,V>,MapEq<K,V>,MapEq.Immutable<K,V>,java.io.Serializable,java.lang.Cloneable,java.util.Map<K,V>
public abstract class AbstractSpecialisedImmutableMap<K,V> extends java.lang.Object implements Map.Immutable<K,V>, java.lang.Cloneable, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.usethesource.capsule.Map
Map.Immutable<K,V>, Map.Transient<K,V>
-
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K extends java.lang.Object,V extends java.lang.Object>
-
Nested classes/interfaces inherited from interface io.usethesource.capsule.MapEq
MapEq.Immutable<K,V>, MapEq.Transient<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description private static Map.ImmutableEMPTY_MAP
-
Constructor Summary
Constructors Constructor Description AbstractSpecialisedImmutableMap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map.Immutable<K,V>__putAll(java.util.Map<? extends K,? extends V> map)Map.Immutable<K,V>__putAllEquivalent(java.util.Map<? extends K,? extends V> map, EqualityComparator<java.lang.Object> cmp)voidclear()java.lang.Objectclone()java.util.Iterator<java.util.Map.Entry<K,V>>entryIterator()static <K,V>
java.util.Map.Entry<K,V>entryOf(K key, V val)booleanequals(java.lang.Object other)booleanequivalent(java.lang.Object other, EqualityComparator<java.lang.Object> cmp)booleanisEmpty()booleanisTransientSupported()static <K,V>
Map.Immutable<K,V>mapOf()static <K,V>
Map.Immutable<K,V>mapOf(java.util.Map<K,V> map)static <K,V>
Map.Immutable<K,V>mapOf(K key1, V val1)static <K,V>
Map.Immutable<K,V>mapOf(K key1, V val1, K key2, V val2)static <K,V>
Map.Immutable<K,V>mapOf(K key1, V val1, K key2, V val2, K key3, V val3)static <K,V>
Map.Immutable<K,V>mapOf(K key1, V val1, K key2, V val2, K key3, V val3, K key4, V val4)static <K,V>
Map.Immutable<K,V>mapOf(K key1, V val1, K key2, V val2, K key3, V val3, K key4, V val4, K key5, V val5)static <K,V>
Map.Immutable<K,V>mapOf(K key1, V val1, K key2, V val2, K key3, V val3, K key4, V val4, K key5, V val5, K key6, V val6)private static <K,V>
Map.Immutable<K,V>of()Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> m)Vremove(java.lang.Object key)java.util.Iterator<V>valueIterator()-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.usethesource.capsule.Map
containsKey, containsValue, get, hashCode, keyIterator, size
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, entrySet, forEach, getOrDefault, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, values
-
Methods inherited from interface io.usethesource.capsule.Map.Immutable
__put, __remove, asTransient
-
Methods inherited from interface io.usethesource.capsule.MapEq
containsKeyEquivalent, containsValueEquivalent, getEquivalent
-
Methods inherited from interface io.usethesource.capsule.MapEq.Immutable
__putEquivalent, __removeEquivalent
-
-
-
-
Field Detail
-
EMPTY_MAP
private static Map.Immutable EMPTY_MAP
-
-
Method Detail
-
of
private static <K,V> Map.Immutable<K,V> of()
-
mapOf
public static <K,V> Map.Immutable<K,V> mapOf()
-
entryOf
public static final <K,V> java.util.Map.Entry<K,V> entryOf(K key, V val)
-
mapOf
public static <K,V> Map.Immutable<K,V> mapOf(K key1, V val1)
-
mapOf
public static <K,V> Map.Immutable<K,V> mapOf(K key1, V val1, K key2, V val2)
-
mapOf
public static <K,V> Map.Immutable<K,V> mapOf(K key1, V val1, K key2, V val2, K key3, V val3)
-
mapOf
public static <K,V> Map.Immutable<K,V> mapOf(K key1, V val1, K key2, V val2, K key3, V val3, K key4, V val4)
-
mapOf
public static <K,V> Map.Immutable<K,V> mapOf(K key1, V val1, K key2, V val2, K key3, V val3, K key4, V val4, K key5, V val5)
-
mapOf
public static <K,V> Map.Immutable<K,V> mapOf(K key1, V val1, K key2, V val2, K key3, V val3, K key4, V val4, K key5, V val5, K key6, V val6)
-
mapOf
public static <K,V> Map.Immutable<K,V> mapOf(java.util.Map<K,V> map)
-
isEmpty
public boolean isEmpty()
-
equals
public boolean equals(java.lang.Object other)
-
equivalent
public boolean equivalent(java.lang.Object other, EqualityComparator<java.lang.Object> cmp)- Specified by:
equivalentin interfaceMapEq<K,V>
-
valueIterator
public java.util.Iterator<V> valueIterator()
- Specified by:
valueIteratorin interfaceMap<K,V>
-
entryIterator
public java.util.Iterator<java.util.Map.Entry<K,V>> entryIterator()
- Specified by:
entryIteratorin interfaceMap<K,V>
-
__putAll
public Map.Immutable<K,V> __putAll(java.util.Map<? extends K,? extends V> map)
- Specified by:
__putAllin interfaceMap.Immutable<K,V>
-
__putAllEquivalent
public Map.Immutable<K,V> __putAllEquivalent(java.util.Map<? extends K,? extends V> map, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__putAllEquivalentin interfaceMapEq.Immutable<K,V>
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
isTransientSupported
public boolean isTransientSupported()
- Specified by:
isTransientSupportedin interfaceMap.Immutable<K,V>
-
-