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>
,java.util.Map<K,V>
- Enclosing class:
- PersistentTrieMap<K,V>
static final class PersistentTrieMap.TransientTrieMap<K,V> extends java.lang.Object implements Map.Transient<K,V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PersistentTrieMap.TransientTrieMap.TransientMapEntryIterator<K,V>
static class
PersistentTrieMap.TransientTrieMap.TransientMapKeyIterator<K,V>
static class
PersistentTrieMap.TransientTrieMap.TransientMapValueIterator<K,V>
-
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 int
cachedHashCode
private int
cachedSize
private java.util.concurrent.atomic.AtomicReference<java.lang.Thread>
mutator
private PersistentTrieMap.AbstractMapNode<K,V>
rootNode
-
Constructor Summary
Constructors Constructor Description TransientTrieMap(PersistentTrieMap<K,V> trieMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
__put(K key, V val)
boolean
__putAll(java.util.Map<? extends K,? extends V> map)
boolean
__putAllEquivalent(java.util.Map<? extends K,? extends V> map, EqualityComparator<java.lang.Object> cmp)
V
__putEquivalent(K key, V val, EqualityComparator<java.lang.Object> cmp)
V
__remove(K key)
V
__removeEquivalent(K key, EqualityComparator<java.lang.Object> cmp)
private boolean
checkHashCodeAndSize(int targetHash, int targetSize)
void
clear()
boolean
containsKey(java.lang.Object o)
boolean
containsKeyEquivalent(java.lang.Object o, EqualityComparator<java.lang.Object> cmp)
boolean
containsValue(java.lang.Object o)
boolean
containsValueEquivalent(java.lang.Object o, EqualityComparator<java.lang.Object> cmp)
java.util.Iterator<java.util.Map.Entry<K,V>>
entryIterator()
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
boolean
equals(java.lang.Object other)
boolean
equivalent(java.lang.Object other, EqualityComparator<java.lang.Object> cmp)
Map.Immutable<K,V>
freeze()
V
get(java.lang.Object o)
V
getEquivalent(java.lang.Object o, EqualityComparator<java.lang.Object> cmp)
int
hashCode()
boolean
isEmpty()
java.util.Iterator<K>
keyIterator()
java.util.Set<K>
keySet()
V
put(K key, V val)
void
putAll(java.util.Map<? extends K,? extends V> m)
V
remove(java.lang.Object key)
int
size()
java.util.Iterator<V>
valueIterator()
java.util.Collection<V>
values()
-
-
-
Field Detail
-
mutator
private final java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator
-
rootNode
private PersistentTrieMap.AbstractMapNode<K,V> rootNode
-
cachedHashCode
private int cachedHashCode
-
cachedSize
private int cachedSize
-
-
Constructor Detail
-
TransientTrieMap
TransientTrieMap(PersistentTrieMap<K,V> trieMap)
-
-
Method Detail
-
checkHashCodeAndSize
private boolean checkHashCodeAndSize(int targetHash, int targetSize)
-
containsKey
public boolean containsKey(java.lang.Object o)
-
containsKeyEquivalent
public boolean containsKeyEquivalent(java.lang.Object o, EqualityComparator<java.lang.Object> cmp)
- Specified by:
containsKeyEquivalent
in interfaceMapEq<K,V>
-
containsValue
public boolean containsValue(java.lang.Object o)
-
containsValueEquivalent
public boolean containsValueEquivalent(java.lang.Object o, EqualityComparator<java.lang.Object> cmp)
- Specified by:
containsValueEquivalent
in interfaceMapEq<K,V>
-
get
public V get(java.lang.Object o)
-
getEquivalent
public V getEquivalent(java.lang.Object o, EqualityComparator<java.lang.Object> cmp)
- Specified by:
getEquivalent
in interfaceMapEq<K,V>
-
__putEquivalent
public V __putEquivalent(K key, V val, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__putEquivalent
in interfaceMapEq.Transient<K,V>
-
__putAll
public boolean __putAll(java.util.Map<? extends K,? extends V> map)
- Specified by:
__putAll
in interfaceMap.Transient<K,V>
-
__putAllEquivalent
public boolean __putAllEquivalent(java.util.Map<? extends K,? extends V> map, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__putAllEquivalent
in interfaceMapEq.Transient<K,V>
-
__removeEquivalent
public V __removeEquivalent(K key, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__removeEquivalent
in interfaceMapEq.Transient<K,V>
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
keyIterator
public java.util.Iterator<K> keyIterator()
- Specified by:
keyIterator
in interfaceMap<K,V>
-
valueIterator
public java.util.Iterator<V> valueIterator()
- Specified by:
valueIterator
in interfaceMap<K,V>
-
entryIterator
public java.util.Iterator<java.util.Map.Entry<K,V>> entryIterator()
- Specified by:
entryIterator
in interfaceMap<K,V>
-
values
public java.util.Collection<V> values()
-
equals
public boolean equals(java.lang.Object other)
-
equivalent
public boolean equivalent(java.lang.Object other, EqualityComparator<java.lang.Object> cmp)
- Specified by:
equivalent
in interfaceMapEq<K,V>
-
hashCode
public int hashCode()
-
freeze
public Map.Immutable<K,V> freeze()
- Specified by:
freeze
in interfaceMap.Transient<K,V>
-
-