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 class
static class
static class
Nested 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 int
private int
private final AtomicReference
<Thread> private PersistentTrieMap.AbstractMapNode
<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
__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 boolean
checkHashCodeAndSize
(int targetHash, int targetSize) void
clear()
boolean
boolean
boolean
boolean
entrySet()
boolean
boolean
equivalent
(Object other, EqualityComparator<Object> cmp) freeze()
getEquivalent
(Object o, EqualityComparator<Object> cmp) int
hashCode()
boolean
isEmpty()
keySet()
void
int
size()
values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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:
containsKey
in interfaceMap<K,
V> - Specified by:
containsKey
in interfaceMap<K,
V>
-
containsKeyEquivalent
- Specified by:
containsKeyEquivalent
in interfaceMapEq<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V> - Specified by:
containsValue
in interfaceMap<K,
V>
-
containsValueEquivalent
- Specified by:
containsValueEquivalent
in interfaceMapEq<K,
V>
-
get
-
getEquivalent
- Specified by:
getEquivalent
in interfaceMapEq<K,
V>
-
__put
- Specified by:
__put
in interfaceMap.Transient<K,
V>
-
__putEquivalent
- Specified by:
__putEquivalent
in interfaceMapEq.Transient<K,
V>
-
__putAll
- Specified by:
__putAll
in interfaceMap.Transient<K,
V>
-
__putAllEquivalent
- Specified by:
__putAllEquivalent
in interfaceMapEq.Transient<K,
V>
-
__remove
- Specified by:
__remove
in interfaceMap.Transient<K,
V>
-
__removeEquivalent
- Specified by:
__removeEquivalent
in interfaceMapEq.Transient<K,
V>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
keyIterator
- Specified by:
keyIterator
in interfaceMap<K,
V>
-
valueIterator
- Specified by:
valueIterator
in interfaceMap<K,
V>
-
entryIterator
- Specified by:
entryIterator
in interfaceMap<K,
V>
-
keySet
-
values
-
entrySet
-
equals
-
equivalent
- Specified by:
equivalent
in interfaceMapEq<K,
V>
-
hashCode
public int hashCode() -
freeze
- Specified by:
freeze
in interfaceMap.Transient<K,
V>
-