Package io.usethesource.capsule.core
Class PersistentTrieMap.TransientTrieMap<K,V>
java.lang.Object
io.usethesource.capsule.core.PersistentTrieMap.TransientTrieMap<K,V>
- All Implemented Interfaces:
Map<K,,V> Map.Transient<K,,V> MapEq<K,,V> MapEq.Transient<K,,V> Map<K,V>
- Enclosing class:
PersistentTrieMap<K,V>
static final class PersistentTrieMap.TransientTrieMap<K,V>
extends Object
implements Map.Transient<K,V>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classNested classes/interfaces inherited from interface io.usethesource.capsule.Map
Map.Immutable<K,V>, Map.Transient<K, V> Nested classes/interfaces inherited from interface io.usethesource.capsule.MapEq
MapEq.Immutable<K,V>, MapEq.Transient<K, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate intprivate final AtomicReference<Thread> private PersistentTrieMap.AbstractMapNode<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanboolean__putAllEquivalent(Map<? extends K, ? extends V> map, EqualityComparator<Object> cmp) __putEquivalent(K key, V val, EqualityComparator<Object> cmp) __removeEquivalent(K key, EqualityComparator<Object> cmp) private booleancheckHashCodeAndSize(int targetHash, int targetSize) voidclear()booleanbooleanbooleanbooleanentrySet()booleanbooleanequivalent(Object other, EqualityComparator<Object> cmp) freeze()getEquivalent(Object o, EqualityComparator<Object> cmp) inthashCode()booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
mutator
-
rootNode
-
cachedHashCode
private int cachedHashCode -
cachedSize
private int cachedSize
-
-
Constructor Details
-
TransientTrieMap
TransientTrieMap(PersistentTrieMap<K, V> trieMap)
-
-
Method Details
-
checkHashCodeAndSize
private boolean checkHashCodeAndSize(int targetHash, int targetSize) -
put
-
putAll
-
clear
public void clear() -
remove
-
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.Transient<K,V>
-
__putEquivalent
- Specified by:
__putEquivalentin interfaceMapEq.Transient<K,V>
-
__putAll
- Specified by:
__putAllin interfaceMap.Transient<K,V>
-
__putAllEquivalent
- Specified by:
__putAllEquivalentin interfaceMapEq.Transient<K,V>
-
__remove
- Specified by:
__removein interfaceMap.Transient<K,V>
-
__removeEquivalent
- Specified by:
__removeEquivalentin interfaceMapEq.Transient<K,V>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
keyIterator
- Specified by:
keyIteratorin interfaceMap<K,V>
-
valueIterator
- Specified by:
valueIteratorin interfaceMap<K,V>
-
entryIterator
- Specified by:
entryIteratorin interfaceMap<K,V>
-
keySet
-
values
-
entrySet
-
equals
-
equivalent
- Specified by:
equivalentin interfaceMapEq<K,V>
-
hashCode
public int hashCode() -
freeze
- Specified by:
freezein interfaceMap.Transient<K,V>
-