Class HashArrayMappedTrieModule.IndexedNode<K,V>
java.lang.Object
io.vavr.collection.HashArrayMappedTrieModule.AbstractNode<K,V>
io.vavr.collection.HashArrayMappedTrieModule.IndexedNode<K,V>
- Type Parameters:
K- Key typeV- Value type
- All Implemented Interfaces:
HashArrayMappedTrie<K,V>, Serializable, Iterable<Tuple2<K, V>>
- Enclosing interface:
HashArrayMappedTrieModule
public static final class HashArrayMappedTrieModule.IndexedNode<K,V>
extends HashArrayMappedTrieModule.AbstractNode<K,V>
implements Serializable
Representation of a HAMT indexed node.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate static final longprivate final intprivate final Object[]Fields inherited from class HashArrayMappedTrieModule.AbstractNode
BUCKET_SIZE, MAX_INDEX_NODE, MIN_ARRAY_NODE, SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate HashArrayMappedTrieModule.ArrayNode<K, V> expand(int frag, HashArrayMappedTrieModule.AbstractNode<K, V> child, int mask, Object[] subNodes) booleanisEmpty()(package private) V(package private) HashArrayMappedTrieModule.AbstractNode<K, V> modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action) intsize()Methods inherited from class HashArrayMappedTrieModule.AbstractNode
containsKey, fromBitmap, get, getOrElse, hashFragment, insert, iterator, keysIterator, nodes, put, remove, remove, toBitmap, toString, update, valuesIteratorMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
bitmap
private final int bitmap -
size
private final int size -
subNodes
-
-
Constructor Details
-
IndexedNode
IndexedNode(int bitmap, int size, Object[] subNodes)
-
-
Method Details
-
lookup
-
lookup
-
modify
HashArrayMappedTrieModule.AbstractNode<K,V> modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action) - Specified by:
modifyin classHashArrayMappedTrieModule.AbstractNode<K,V>
-
expand
private HashArrayMappedTrieModule.ArrayNode<K,V> expand(int frag, HashArrayMappedTrieModule.AbstractNode<K, V> child, int mask, Object[] subNodes) -
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceHashArrayMappedTrie<K,V>
-
size
public int size()- Specified by:
sizein interfaceHashArrayMappedTrie<K,V>
-