Class HashArrayMappedTrieModule.LeafList<K,V>
java.lang.Object
io.vavr.collection.HashArrayMappedTrieModule.AbstractNode<K,V>
io.vavr.collection.HashArrayMappedTrieModule.LeafNode<K,V>
io.vavr.collection.HashArrayMappedTrieModule.LeafList<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.LeafList<K,V>
extends HashArrayMappedTrieModule.LeafNode<K,V>
implements Serializable
Representation of a HAMT leaf node with more than one element.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final Kprivate static final longprivate final intprivate final HashArrayMappedTrieModule.LeafNode<K, V> private final VFields inherited from class HashArrayMappedTrieModule.AbstractNode
BUCKET_SIZE, MAX_INDEX_NODE, MIN_ARRAY_NODE, SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) inthash()(package private) Kkey()(package private) Vprivate static <K,V> HashArrayMappedTrieModule.AbstractNode <K, V> mergeNodes(HashArrayMappedTrieModule.LeafNode<K, V> leaf1, HashArrayMappedTrieModule.LeafNode<K, V> leaf2) (package private) HashArrayMappedTrieModule.AbstractNode<K, V> modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action) nodes()private HashArrayMappedTrieModule.AbstractNode<K, V> removeElement(K k) intsize()(package private) Vvalue()Methods inherited from class HashArrayMappedTrieModule.LeafNode
isEmpty, mergeLeavesMethods inherited from class HashArrayMappedTrieModule.AbstractNode
containsKey, fromBitmap, get, getOrElse, hashFragment, insert, iterator, keysIterator, 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:
-
hash
private final int hash -
key
-
value
-
size
private final int size -
tail
-
-
Constructor Details
-
LeafList
LeafList(int hash, K key, V value, HashArrayMappedTrieModule.LeafNode<K, V> tail)
-
-
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>
-
mergeNodes
private static <K,V> HashArrayMappedTrieModule.AbstractNode<K,V> mergeNodes(HashArrayMappedTrieModule.LeafNode<K, V> leaf1, HashArrayMappedTrieModule.LeafNode<K, V> leaf2) -
removeElement
-
size
public int size()- Specified by:
sizein interfaceHashArrayMappedTrie<K,V>
-
nodes
- Overrides:
nodesin classHashArrayMappedTrieModule.AbstractNode<K,V>
-
hash
int hash()- Specified by:
hashin classHashArrayMappedTrieModule.LeafNode<K,V>
-
key
K key()- Specified by:
keyin classHashArrayMappedTrieModule.LeafNode<K,V>
-
value
V value()- Specified by:
valuein classHashArrayMappedTrieModule.LeafNode<K,V>
-