Top Description Fields Methods
io.vavr.collection

pack-priv Interface HashArrayMappedTrie<K, V>

Additional top-level class in compilation unit: HashArrayMappedTrieModule.

extends Iterable<Tuple2<K, V>>, Serializable
Known Direct Implementers
io.vavr.collection.HashArrayMappedTrieModule.AbstractNode
Imports
io.vavr.Tuple, .Tuple2, io.vavr.collection.HashArrayMappedTrieModule.EmptyNode, io.vavr.control.Option, java.io.Serializable, java.util.Objects

An immutable Hash array mapped trie (HAMT).
Author
Ruslan Sennov

Field Summary

Modifier and TypeField and Description
public static final long

Method Summary

Modifier and TypeMethod and Description
public boolean
containsKey(K key)

public static <K, V> HashArrayMappedTrie<K, V>
public Option<V>
get(K key)

public V
getOrElse(K key, V defaultValue)

public boolean
public Iterator<Tuple2<K, V>>
iterator()

Redeclares java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public Iterator<K>
keysIterator()

Provide unboxed access to the keys in the trie.

public HashArrayMappedTrie<K, V>
put(K key, V value)

public HashArrayMappedTrie<K, V>
remove(K key)

public int
size()

public Iterator<V>
valuesIterator()

Provide unboxed access to the values in the trie.

Inherited from java.lang.Iterable:
forEachspliterator

Field Detail

serialVersionUIDback to summary
public static final long serialVersionUID

Method Detail

containsKeyback to summary
public boolean containsKey(K key)
emptyback to summary
public static <K, V> HashArrayMappedTrie<K, V> empty()
getback to summary
public Option<V> get(K key)
getOrElseback to summary
public V getOrElse(K key, V defaultValue)
isEmptyback to summary
public boolean isEmpty()
iteratorback to summary
public Iterator<Tuple2<K, V>> iterator()

Redeclares java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<Tuple2<K, V>>

an Iterator.

Annotations
@Override
keysIteratorback to summary
public Iterator<K> keysIterator()

Provide unboxed access to the keys in the trie.

putback to summary
public HashArrayMappedTrie<K, V> put(K key, V value)
removeback to summary
public HashArrayMappedTrie<K, V> remove(K key)
sizeback to summary
public int size()
valuesIteratorback to summary
public Iterator<V> valuesIterator()

Provide unboxed access to the values in the trie.