Class PersistentTrieMap<K,V>
java.lang.Object
io.usethesource.capsule.core.PersistentTrieMap<K,V>
- All Implemented Interfaces:
Map<K,V>, Map.Immutable<K, V>, MapEq<K, V>, MapEq.Immutable<K, V>, Serializable, Map<K, V>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classIterator skeleton that uses a fixed stack in depth.protected static classprivate static final classprotected static classprotected static classprivate static final classprotected static classprotected static classprotected static class(package private) static final classprivate static classIterator that first iterates over inlined-values and then continues depth first recursively.Nested classes/interfaces inherited from interface Map
Map.Immutable<K,V>, Map.Transient<K, V> Nested classes/interfaces inherited from interface MapEq
MapEq.Immutable<K,V>, MapEq.Transient<K, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate static final booleanprivate static final PersistentTrieMapprivate static final PersistentTrieMap.CompactMapNodeprivate final PersistentTrieMap.AbstractMapNode<K, V> private static final long -
Constructor Summary
ConstructorsConstructorDescriptionPersistentTrieMap(PersistentTrieMap.AbstractMapNode<K, V> rootNode, int cachedHashCode, int cachedSize) -
Method Summary
Modifier and TypeMethodDescription__putAllEquivalent(Map<? extends K, ? extends V> map, EqualityComparator<Object> cmp) __putEquivalent(K key, V val, EqualityComparator<Object> cmp) __removeEquivalent(K key, EqualityComparator<Object> cmp) protected int[][]protected int[]private booleancheckHashCodeAndSize(int targetHash, int targetSize) voidclear()booleanbooleanbooleanbooleanentrySet()booleanbooleanequivalent(Object other, EqualityComparator<Object> cmp) getEquivalent(Object o, EqualityComparator<Object> cmp) protected intprotected PersistentTrieMap.AbstractMapNode<K, V> inthashCode()booleanisEmpty()booleankeySet()protected Iterator<PersistentTrieMap.AbstractMapNode<K, V>> static final <K,V> Map.Immutable <K, V> of()static final <K,V> Map.Immutable <K, V> voidvoidintsize()toString()static final inttransformHashCode(int hash) static final <K,V> Map.Transient <K, V> static final <K,V> Map.Transient <K, V> transientOf(Object... keyValuePairs) values()Methods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
EMPTY_NODE
-
EMPTY_MAP
-
DEBUG
private static final boolean DEBUG- See Also:
-
rootNode
-
cachedHashCode
private final int cachedHashCode -
cachedSize
private final int cachedSize
-
-
Constructor Details
-
PersistentTrieMap
PersistentTrieMap(PersistentTrieMap.AbstractMapNode<K, V> rootNode, int cachedHashCode, int cachedSize)
-
-
Method Details
-
of
-
of
-
transientOf
-
transientOf
-
checkHashCodeAndSize
private boolean checkHashCodeAndSize(int targetHash, int targetSize) -
transformHashCode
public static final int transformHashCode(int hash) -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Specified by:
containsKeyin interfaceMap<K,V>
-
containsKeyEquivalent
- Specified by:
containsKeyEquivalentin interfaceMapEq<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V> - Specified by:
containsValuein interfaceMap<K,V>
-
containsValueEquivalent
- Specified by:
containsValueEquivalentin interfaceMapEq<K,V>
-
get
-
getEquivalent
- Specified by:
getEquivalentin interfaceMapEq<K,V>
-
__put
- Specified by:
__putin interfaceMap.Immutable<K,V>
-
__putEquivalent
- Specified by:
__putEquivalentin interfaceMapEq.Immutable<K,V>
-
__putAll
- Specified by:
__putAllin interfaceMap.Immutable<K,V>
-
__putAllEquivalent
public Map.Immutable<K,V> __putAllEquivalent(Map<? extends K, ? extends V> map, EqualityComparator<Object> cmp) - Specified by:
__putAllEquivalentin interfaceMapEq.Immutable<K,V>
-
__remove
- Specified by:
__removein interfaceMap.Immutable<K,V>
-
__removeEquivalent
- Specified by:
__removeEquivalentin interfaceMapEq.Immutable<K,V>
-
put
-
putAll
-
clear
-
remove
-
size
-
isEmpty
-
keyIterator
-
valueIterator
-
entryIterator
-
keySet
-
values
-
entrySet
-
equals
-
equivalent
- Specified by:
equivalentin interfaceMapEq<K,V>
-
hashCode
-
toString
-
isTransientSupported
public boolean isTransientSupported()- Specified by:
isTransientSupportedin interfaceMap.Immutable<K,V>
-
asTransient
- Specified by:
asTransientin interfaceMap.Immutable<K,V>
-
getRootNode
-
nodeIterator
-
getNodeCount
protected int getNodeCount() -
arityCombinationsHistogram
protected int[][] arityCombinationsHistogram() -
arityHistogram
protected int[] arityHistogram() -
printStatistics
public void printStatistics()
-