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 intprivate static final long(package private) static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(K key) (package private) static intfromBitmap(int bitmap, int bit) (package private) static inthashFragment(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 inttoBitmap(int hash) final StringtoString()(package private) static Object[]Provide unboxed access to the values in the trie.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface HashArrayMappedTrie
isEmpty, sizeMethods inherited from interface 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:HashArrayMappedTrieProvide unboxed access to the keys in the trie.- Specified by:
keysIteratorin interfaceHashArrayMappedTrie<K,V>
-
valuesIterator
Description copied from interface:HashArrayMappedTrieProvide unboxed access to the values in the trie.- Specified by:
valuesIteratorin interfaceHashArrayMappedTrie<K,V>
-
get
-
getOrElse
-
containsKey
- Specified by:
containsKeyin interfaceHashArrayMappedTrie<K,V>
-
put
- Specified by:
putin interfaceHashArrayMappedTrie<K,V>
-
remove
- Specified by:
removein interfaceHashArrayMappedTrie<K,V>
-
toString
-