Package io.vavr.collection
Interface HashArrayMappedTrie<K,V>
-
- All Superinterfaces:
java.lang.Iterable<Tuple2<K,V>>,java.io.Serializable
- All Known Implementing Classes:
HashArrayMappedTrieModule.AbstractNode,HashArrayMappedTrieModule.ArrayNode,HashArrayMappedTrieModule.EmptyNode,HashArrayMappedTrieModule.IndexedNode,HashArrayMappedTrieModule.LeafList,HashArrayMappedTrieModule.LeafNode,HashArrayMappedTrieModule.LeafSingleton
interface HashArrayMappedTrie<K,V> extends java.lang.Iterable<Tuple2<K,V>>, java.io.Serializable
An immutable Hash array mapped trie (HAMT).
-
-
Field Summary
Fields Modifier and Type Field Description static longserialVersionUID
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsKey(K key)static <K,V>
HashArrayMappedTrie<K,V>empty()Option<V>get(K key)VgetOrElse(K key, V defaultValue)booleanisEmpty()Iterator<Tuple2<K,V>>iterator()Iterator<K>keysIterator()Provide unboxed access to the keys in the trie.HashArrayMappedTrie<K,V>put(K key, V value)HashArrayMappedTrie<K,V>remove(K key)intsize()Iterator<V>valuesIterator()Provide unboxed access to the values in the trie.
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
empty
static <K,V> HashArrayMappedTrie<K,V> empty()
-
isEmpty
boolean isEmpty()
-
size
int size()
-
containsKey
boolean containsKey(K key)
-
put
HashArrayMappedTrie<K,V> put(K key, V value)
-
remove
HashArrayMappedTrie<K,V> remove(K key)
-
iterator
Iterator<Tuple2<K,V>> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<K>
-
-