Package io.vavr.collection
Class HashArrayMappedTrieModule.AbstractNode<K,V>
java.lang.Object
io.vavr.collection.HashArrayMappedTrieModule.AbstractNode<K,V>
- Type Parameters:
K
- Key typeV
- Value type
- All Implemented Interfaces:
HashArrayMappedTrie<K,
,V> Serializable
,Iterable<Tuple2<K,
V>>
- Direct Known Subclasses:
HashArrayMappedTrieModule.ArrayNode
,HashArrayMappedTrieModule.EmptyNode
,HashArrayMappedTrieModule.IndexedNode
,HashArrayMappedTrieModule.LeafNode
- Enclosing interface:
HashArrayMappedTrieModule
public abstract static class HashArrayMappedTrieModule.AbstractNode<K,V>
extends Object
implements HashArrayMappedTrie<K,V>
An abstract base class for nodes of a HAMT.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
(package private) static final int
(package private) static final int
private static final long
(package private) static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(K key) (package private) static int
fromBitmap
(int bitmap, int bit) (package private) static int
hashFragment
(int shift, int hash) (package private) static Object[]
iterator()
Provide unboxed access to the keys in the trie.(package private) abstract V
(package private) abstract HashArrayMappedTrieModule.AbstractNode
<K, V> modify
(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action) (package private) Iterator
<HashArrayMappedTrieModule.LeafNode<K, V>> nodes()
(package private) static Object[]
(package private) static int
toBitmap
(int hash) final String
toString()
(package private) static Object[]
Provide unboxed access to the values in the trie.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.vavr.collection.HashArrayMappedTrie
isEmpty, size
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
SIZE
static final int SIZE- See Also:
-
BUCKET_SIZE
static final int BUCKET_SIZE- See Also:
-
MAX_INDEX_NODE
static final int MAX_INDEX_NODE- See Also:
-
MIN_ARRAY_NODE
static final int MIN_ARRAY_NODE- See Also:
-
-
Constructor Details
-
AbstractNode
public AbstractNode()
-
-
Method Details
-
hashFragment
static int hashFragment(int shift, int hash) -
toBitmap
static int toBitmap(int hash) -
fromBitmap
static int fromBitmap(int bitmap, int bit) -
update
-
remove
-
insert
-
lookup
-
lookup
-
modify
abstract HashArrayMappedTrieModule.AbstractNode<K,V> modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action) -
nodes
Iterator<HashArrayMappedTrieModule.LeafNode<K,V>> nodes() -
iterator
-
keysIterator
Description copied from interface:HashArrayMappedTrie
Provide unboxed access to the keys in the trie.- Specified by:
keysIterator
in interfaceHashArrayMappedTrie<K,
V>
-
valuesIterator
Description copied from interface:HashArrayMappedTrie
Provide unboxed access to the values in the trie.- Specified by:
valuesIterator
in interfaceHashArrayMappedTrie<K,
V>
-
get
- Specified by:
get
in interfaceHashArrayMappedTrie<K,
V>
-
getOrElse
- Specified by:
getOrElse
in interfaceHashArrayMappedTrie<K,
V>
-
containsKey
- Specified by:
containsKey
in interfaceHashArrayMappedTrie<K,
V>
-
put
- Specified by:
put
in interfaceHashArrayMappedTrie<K,
V>
-
remove
- Specified by:
remove
in interfaceHashArrayMappedTrie<K,
V>
-
toString
-