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 classPersistentTrieMap.TransientTrieMap.TransientMapEntryIterator<K,V>static classPersistentTrieMap.TransientTrieMap.TransientMapKeyIterator<K,V>static classPersistentTrieMap.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 intcachedHashCodeprivate intcachedSizeprivate java.util.concurrent.atomic.AtomicReference<java.lang.Thread>mutatorprivate 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 booleancheckHashCodeAndSize(int targetHash, int targetSize)voidclear()booleancontainsKey(java.lang.Object o)booleancontainsKeyEquivalent(java.lang.Object o, EqualityComparator<java.lang.Object> cmp)booleancontainsValue(java.lang.Object o)booleancontainsValueEquivalent(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()booleanequals(java.lang.Object other)booleanequivalent(java.lang.Object other, EqualityComparator<java.lang.Object> cmp)Map.Immutable<K,V>freeze()Vget(java.lang.Object o)VgetEquivalent(java.lang.Object o, EqualityComparator<java.lang.Object> cmp)inthashCode()booleanisEmpty()java.util.Iterator<K>keyIterator()java.util.Set<K>keySet()Vput(K key, V val)voidputAll(java.util.Map<? extends K,? extends V> m)Vremove(java.lang.Object key)intsize()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:
containsKeyEquivalentin 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:
containsValueEquivalentin 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:
getEquivalentin interfaceMapEq<K,V>
-
__putEquivalent
public V __putEquivalent(K key, V val, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__putEquivalentin interfaceMapEq.Transient<K,V>
-
__putAll
public boolean __putAll(java.util.Map<? extends K,? extends V> map)
- Specified by:
__putAllin interfaceMap.Transient<K,V>
-
__putAllEquivalent
public boolean __putAllEquivalent(java.util.Map<? extends K,? extends V> map, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__putAllEquivalentin interfaceMapEq.Transient<K,V>
-
__removeEquivalent
public V __removeEquivalent(K key, EqualityComparator<java.lang.Object> cmp)
- Specified by:
__removeEquivalentin interfaceMapEq.Transient<K,V>
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
keyIterator
public java.util.Iterator<K> keyIterator()
- Specified by:
keyIteratorin interfaceMap<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>
-
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:
equivalentin interfaceMapEq<K,V>
-
hashCode
public int hashCode()
-
freeze
public Map.Immutable<K,V> freeze()
- Specified by:
freezein interfaceMap.Transient<K,V>
-
-