Top Inners
io.vavr.collection

pack-priv Interface HashArrayMappedTrieModule

Located in compilation unit of io.vavr.collection.HashArrayMappedTrie.


Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
HashArrayMappedTrieModule.AbstractNode<
Key type
K
,
Value type
V
>

An abstract base class for nodes of a HAMT.

public static enum
public static class
HashArrayMappedTrieModule.ArrayNode<
Key type
K
,
Value type
V
>

Representation of a HAMT array node.

public static class
HashArrayMappedTrieModule.EmptyNode<
Key type
K
,
Value type
V
>

The empty node.

public static class
HashArrayMappedTrieModule.IndexedNode<
Key type
K
,
Value type
V
>

Representation of a HAMT indexed node.

public static class
HashArrayMappedTrieModule.LeafList<
Key type
K
,
Value type
V
>

Representation of a HAMT leaf node with more than one element.

public abstract static class
HashArrayMappedTrieModule.LeafNode<
Key type
K
,
Value type
V
>

Representation of a HAMT leaf.

public static class
public static class
HashArrayMappedTrieModule.LeafSingleton<
Key type
K
,
Value type
V
>

Representation of a HAMT leaf node with single element.

io.vavr.collection back to summary

public abstract Class HashArrayMappedTrieModule.AbstractNode<K, V>

extends Object
implements HashArrayMappedTrie<K, V>
Class Inheritance
All Implemented Interfaces
io.vavr.collection.HashArrayMappedTrie, java.io.Serializable, java.lang.Iterable
Known Direct Subclasses
io.vavr.collection.HashArrayMappedTrieModule.EmptyNode, io.vavr.collection.HashArrayMappedTrieModule.LeafNode, io.vavr.collection.HashArrayMappedTrieModule.IndexedNode, io.vavr.collection.HashArrayMappedTrieModule.ArrayNode
Type Parameters
<K>
Key type
<V>
Value type

An abstract base class for nodes of a HAMT.

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final int
pack-priv static final int
private static final long
pack-priv static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
pack-priv static int
fromBitmap(int bitmap, int bit)

public Option<V>
public V
pack-priv static int
hashFragment(int shift, int hash)

pack-priv static Object[]
insert(Object[] arr, int index, Object newElem)

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

Implements io.vavr.collection.HashArrayMappedTrie.iterator.

Returns an iterator over elements of type T.

public Iterator<K>
keysIterator()

Implements io.vavr.collection.HashArrayMappedTrie.keysIterator.

Provide unboxed access to the keys in the trie.

pack-priv abstract Option<V>
lookup(int shift, int keyHash, K key)

pack-priv abstract V
lookup(int shift, int keyHash, K key, V defaultValue)

pack-priv abstract HashArrayMappedTrieModule.AbstractNode<K, V>
modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)

pack-priv Iterator<HashArrayMappedTrieModule.LeafNode<K, V>>
public HashArrayMappedTrie<K, V>
pack-priv static Object[]
remove(Object[] arr, int index)

public HashArrayMappedTrie<K, V>
pack-priv static int
toBitmap(int hash)

public final String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

pack-priv static Object[]
update(Object[] arr, int index, Object newElement)

public Iterator<V>
valuesIterator()

Implements io.vavr.collection.HashArrayMappedTrie.valuesIterator.

Provide unboxed access to the values in the trie.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

BUCKET_SIZEback to summary
pack-priv static final int BUCKET_SIZE
MAX_INDEX_NODEback to summary
pack-priv static final int MAX_INDEX_NODE
MIN_ARRAY_NODEback to summary
pack-priv static final int MIN_ARRAY_NODE
serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.vavr.collection.HashArrayMappedTrie.serialVersionUID.

SIZEback to summary
pack-priv static final int SIZE

Constructor Detail

AbstractNodeback to summary
public AbstractNode()

Method Detail

containsKeyback to summary
public boolean containsKey(K key)

Implements io.vavr.collection.HashArrayMappedTrie.containsKey.

Annotations
@Override
fromBitmapback to summary
pack-priv static int fromBitmap(int bitmap, int bit)
getback to summary
public Option<V> get(K key)

Implements io.vavr.collection.HashArrayMappedTrie.get.

Annotations
@Override
getOrElseback to summary
public V getOrElse(K key, V defaultValue)

Implements io.vavr.collection.HashArrayMappedTrie.getOrElse.

Annotations
@Override
hashFragmentback to summary
pack-priv static int hashFragment(int shift, int hash)
insertback to summary
pack-priv static Object[] insert(Object[] arr, int index, Object newElem)
iteratorback to summary
public Iterator<Tuple2<K, V>> iterator()

Implements io.vavr.collection.HashArrayMappedTrie.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()

Implements io.vavr.collection.HashArrayMappedTrie.keysIterator.

Doc from io.vavr.collection.HashArrayMappedTrie.keysIterator.

Provide unboxed access to the keys in the trie.

Annotations
@Override
lookupback to summary
pack-priv abstract Option<V> lookup(int shift, int keyHash, K key)
lookupback to summary
pack-priv abstract V lookup(int shift, int keyHash, K key, V defaultValue)
modifyback to summary
pack-priv abstract HashArrayMappedTrieModule.AbstractNode<K, V> modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)
nodesback to summary
pack-priv Iterator<HashArrayMappedTrieModule.LeafNode<K, V>> nodes()
putback to summary
public HashArrayMappedTrie<K, V> put(K key, V value)

Implements io.vavr.collection.HashArrayMappedTrie.put.

Annotations
@Override
removeback to summary
pack-priv static Object[] remove(Object[] arr, int index)
removeback to summary
public HashArrayMappedTrie<K, V> remove(K key)

Implements io.vavr.collection.HashArrayMappedTrie.remove.

Annotations
@Override
toBitmapback to summary
pack-priv static int toBitmap(int hash)
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
updateback to summary
pack-priv static Object[] update(Object[] arr, int index, Object newElement)
valuesIteratorback to summary
public Iterator<V> valuesIterator()

Implements io.vavr.collection.HashArrayMappedTrie.valuesIterator.

Doc from io.vavr.collection.HashArrayMappedTrie.valuesIterator.

Provide unboxed access to the values in the trie.

Annotations
@Override
io.vavr.collection back to summary

public final Enum HashArrayMappedTrieModule.Action

extends Enum<HashArrayMappedTrieModule.Action>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final HashArrayMappedTrieModule.Action
public static final HashArrayMappedTrieModule.Action

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static HashArrayMappedTrieModule.Action
public static HashArrayMappedTrieModule.Action[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

PUTback to summary
public static final HashArrayMappedTrieModule.Action PUT
REMOVEback to summary
public static final HashArrayMappedTrieModule.Action REMOVE

Constructor Detail

Actionback to summary
private Action()

Method Detail

valueOfback to summary
public static HashArrayMappedTrieModule.Action valueOf(String name)
valuesback to summary
public static HashArrayMappedTrieModule.Action[] values()
io.vavr.collection back to summary

public final Class HashArrayMappedTrieModule.ArrayNode<K, V>

extends HashArrayMappedTrieModule.AbstractNode<K, V>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Type Parameters
<K>
Key type
<V>
Value type

Representation of a HAMT array node.

Field Summary

Modifier and TypeField and Description
private final int
private static final long
private final int
private final Object[]
Inherited from io.vavr.collection.HashArrayMappedTrieModule.AbstractNode:
BUCKET_SIZEMAX_INDEX_NODEMIN_ARRAY_NODESIZE

Constructor Summary

AccessConstructor and Description
pack-priv
ArrayNode(int count, int size, Object[] subNodes)

Method Summary

Modifier and TypeMethod and Description
public boolean
pack-priv Option<V>
lookup(int shift, int keyHash, K key)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

pack-priv V
lookup(int shift, int keyHash, K key, V defaultValue)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

pack-priv HashArrayMappedTrieModule.AbstractNode<K, V>
modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.modify.

private HashArrayMappedTrieModule.IndexedNode<K, V>
pack(int idx, Object[] elements)

public int
Inherited from io.vavr.collection.HashArrayMappedTrieModule.AbstractNode:
containsKeyfromBitmapgetgetOrElsehashFragmentinsertiteratorkeysIteratornodesputremoveremovetoBitmaptoStringupdatevaluesIterator

Field Detail

countback to summary
private final int count
serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.serialVersionUID, io.vavr.collection.HashArrayMappedTrie.serialVersionUID.

sizeback to summary
private final int size
subNodesback to summary
private final Object[] subNodes
Annotations
@SuppressWarnings:serial

Constructor Detail

ArrayNodeback to summary
pack-priv ArrayNode(int count, int size, Object[] subNodes)

Method Detail

isEmptyback to summary
public boolean isEmpty()

Implements io.vavr.collection.HashArrayMappedTrie.isEmpty.

Annotations
@Override
lookupback to summary
pack-priv Option<V> lookup(int shift, int keyHash, K key)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

Annotations
@SuppressWarnings:unchecked
@Override
lookupback to summary
pack-priv V lookup(int shift, int keyHash, K key, V defaultValue)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

Annotations
@SuppressWarnings:unchecked
@Override
modifyback to summary
pack-priv HashArrayMappedTrieModule.AbstractNode<K, V> modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.modify.

Annotations
@SuppressWarnings:unchecked
@Override
packback to summary
private HashArrayMappedTrieModule.IndexedNode<K, V> pack(int idx, Object[] elements)
Annotations
@SuppressWarnings:unchecked
sizeback to summary
public int size()

Implements io.vavr.collection.HashArrayMappedTrie.size.

Annotations
@Override
io.vavr.collection back to summary

public final Class HashArrayMappedTrieModule.EmptyNode<K, V>

extends HashArrayMappedTrieModule.AbstractNode<K, V>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Type Parameters
<K>
Key type
<V>
Value type

The empty node.

Field Summary

Modifier and TypeField and Description
private static final HashArrayMappedTrieModule.EmptyNode<?, ?>
private static final long
Inherited from io.vavr.collection.HashArrayMappedTrieModule.AbstractNode:
BUCKET_SIZEMAX_INDEX_NODEMIN_ARRAY_NODESIZE

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static <K, V> HashArrayMappedTrieModule.EmptyNode<K, V>
public boolean
pack-priv Option<V>
lookup(int shift, int keyHash, K key)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

pack-priv V
lookup(int shift, int keyHash, K key, V defaultValue)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

pack-priv HashArrayMappedTrieModule.AbstractNode<K, V>
modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.modify.

public Iterator<HashArrayMappedTrieModule.LeafNode<K, V>>
private Object

Returns:

The singleton instance of EmptyNode.
readResolve
()

Instance control for object serialization.

public int
Inherited from io.vavr.collection.HashArrayMappedTrieModule.AbstractNode:
containsKeyfromBitmapgetgetOrElsehashFragmentinsertiteratorkeysIteratorputremoveremovetoBitmaptoStringupdatevaluesIterator

Field Detail

INSTANCEback to summary
private static final HashArrayMappedTrieModule.EmptyNode<?, ?> INSTANCE
serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.serialVersionUID, io.vavr.collection.HashArrayMappedTrie.serialVersionUID.

Constructor Detail

EmptyNodeback to summary
private EmptyNode()

Method Detail

instanceback to summary
pack-priv static <K, V> HashArrayMappedTrieModule.EmptyNode<K, V> instance()
Annotations
@SuppressWarnings:unchecked
isEmptyback to summary
public boolean isEmpty()

Implements io.vavr.collection.HashArrayMappedTrie.isEmpty.

Annotations
@Override
lookupback to summary
pack-priv Option<V> lookup(int shift, int keyHash, K key)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

Annotations
@Override
lookupback to summary
pack-priv V lookup(int shift, int keyHash, K key, V defaultValue)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

Annotations
@Override
modifyback to summary
pack-priv HashArrayMappedTrieModule.AbstractNode<K, V> modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.modify.

Annotations
@Override
nodesback to summary
public Iterator<HashArrayMappedTrieModule.LeafNode<K, V>> nodes()

Overrides io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.nodes.

Annotations
@Override
readResolveback to summary
private Object readResolve()

Instance control for object serialization.

Returns:Object

The singleton instance of EmptyNode.

See Also
Serializable
sizeback to summary
public int size()

Implements io.vavr.collection.HashArrayMappedTrie.size.

Annotations
@Override
io.vavr.collection back to summary

public final Class HashArrayMappedTrieModule.IndexedNode<K, V>

extends HashArrayMappedTrieModule.AbstractNode<K, V>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Type Parameters
<K>
Key type
<V>
Value type

Representation of a HAMT indexed node.

Field Summary

Modifier and TypeField and Description
private final int
private static final long
private final int
private final Object[]
Inherited from io.vavr.collection.HashArrayMappedTrieModule.AbstractNode:
BUCKET_SIZEMAX_INDEX_NODEMIN_ARRAY_NODESIZE

Constructor Summary

AccessConstructor and Description
pack-priv
IndexedNode(int bitmap, int size, Object[] subNodes)

Method Summary

Modifier and TypeMethod and Description
private HashArrayMappedTrieModule.ArrayNode<K, V>
expand(int frag, HashArrayMappedTrieModule.AbstractNode<K, V> child, int mask, Object[] subNodes)

public boolean
pack-priv Option<V>
lookup(int shift, int keyHash, K key)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

pack-priv V
lookup(int shift, int keyHash, K key, V defaultValue)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

pack-priv HashArrayMappedTrieModule.AbstractNode<K, V>
modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.modify.

public int
Inherited from io.vavr.collection.HashArrayMappedTrieModule.AbstractNode:
containsKeyfromBitmapgetgetOrElsehashFragmentinsertiteratorkeysIteratornodesputremoveremovetoBitmaptoStringupdatevaluesIterator

Field Detail

bitmapback to summary
private final int bitmap
serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.serialVersionUID, io.vavr.collection.HashArrayMappedTrie.serialVersionUID.

sizeback to summary
private final int size
subNodesback to summary
private final Object[] subNodes
Annotations
@SuppressWarnings:serial

Constructor Detail

IndexedNodeback to summary
pack-priv IndexedNode(int bitmap, int size, Object[] subNodes)

Method Detail

expandback to summary
private HashArrayMappedTrieModule.ArrayNode<K, V> expand(int frag, HashArrayMappedTrieModule.AbstractNode<K, V> child, int mask, Object[] subNodes)
isEmptyback to summary
public boolean isEmpty()

Implements io.vavr.collection.HashArrayMappedTrie.isEmpty.

Annotations
@Override
lookupback to summary
pack-priv Option<V> lookup(int shift, int keyHash, K key)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

Annotations
@SuppressWarnings:unchecked
@Override
lookupback to summary
pack-priv V lookup(int shift, int keyHash, K key, V defaultValue)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

Annotations
@SuppressWarnings:unchecked
@Override
modifyback to summary
pack-priv HashArrayMappedTrieModule.AbstractNode<K, V> modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.modify.

Annotations
@SuppressWarnings:unchecked
@Override
sizeback to summary
public int size()

Implements io.vavr.collection.HashArrayMappedTrie.size.

Annotations
@Override
io.vavr.collection back to summary

public final Class HashArrayMappedTrieModule.LeafList<K, V>

extends HashArrayMappedTrieModule.LeafNode<K, V>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Type Parameters
<K>
Key type
<V>
Value type

Representation of a HAMT leaf node with more than one element.

Field Summary

Modifier and TypeField and Description
private final int
private final K
private static final long
private final int
private final HashArrayMappedTrieModule.LeafNode<K, V>
private final V

Constructor Summary

AccessConstructor and Description
pack-priv
LeafList(int hash, K key, V value, HashArrayMappedTrieModule.LeafNode<K, V> tail)

Method Summary

Modifier and TypeMethod and Description
pack-priv int
pack-priv K
pack-priv Option<V>
lookup(int shift, int keyHash, K key)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

pack-priv V
lookup(int shift, int keyHash, K key, V defaultValue)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

private static <K, V> HashArrayMappedTrieModule.AbstractNode<K, V>
pack-priv HashArrayMappedTrieModule.AbstractNode<K, V>
modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.modify.

public Iterator<HashArrayMappedTrieModule.LeafNode<K, V>>
private HashArrayMappedTrieModule.AbstractNode<K, V>
public int
pack-priv V
Inherited from io.vavr.collection.HashArrayMappedTrieModule.LeafNode:
isEmptymergeLeaves

Field Detail

hashback to summary
private final int hash
keyback to summary
private final K key
Annotations
@SuppressWarnings:serial
serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.vavr.collection.HashArrayMappedTrieModule.LeafNode.serialVersionUID, io.vavr.collection.HashArrayMappedTrie.serialVersionUID.

sizeback to summary
private final int size
tailback to summary
private final HashArrayMappedTrieModule.LeafNode<K, V> tail
valueback to summary
private final V value
Annotations
@SuppressWarnings:serial

Constructor Detail

LeafListback to summary
pack-priv LeafList(int hash, K key, V value, HashArrayMappedTrieModule.LeafNode<K, V> tail)

Method Detail

hashback to summary
pack-priv int hash()

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.LeafNode.hash.

Annotations
@Override
keyback to summary
pack-priv K key()

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.LeafNode.key.

Annotations
@Override
lookupback to summary
pack-priv Option<V> lookup(int shift, int keyHash, K key)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

Annotations
@Override
lookupback to summary
pack-priv V lookup(int shift, int keyHash, K key, V defaultValue)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

Annotations
@Override
mergeNodesback to summary
private static <K, V> HashArrayMappedTrieModule.AbstractNode<K, V> mergeNodes(HashArrayMappedTrieModule.LeafNode<K, V> leaf1, HashArrayMappedTrieModule.LeafNode<K, V> leaf2)
modifyback to summary
pack-priv HashArrayMappedTrieModule.AbstractNode<K, V> modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.modify.

Annotations
@Override
nodesback to summary
public Iterator<HashArrayMappedTrieModule.LeafNode<K, V>> nodes()

Overrides io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.nodes.

Annotations
@Override
removeElementback to summary
private HashArrayMappedTrieModule.AbstractNode<K, V> removeElement(K k)
sizeback to summary
public int size()

Implements io.vavr.collection.HashArrayMappedTrie.size.

Annotations
@Override
valueback to summary
pack-priv V value()

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.LeafNode.value.

Annotations
@Override
io.vavr.collection back to summary

public abstract Class HashArrayMappedTrieModule.LeafNode<K, V>

extends HashArrayMappedTrieModule.AbstractNode<K, V>
Class Inheritance
Known Direct Subclasses
io.vavr.collection.HashArrayMappedTrieModule.LeafSingleton, io.vavr.collection.HashArrayMappedTrieModule.LeafList
Type Parameters
<K>
Key type
<V>
Value type

Representation of a HAMT leaf.

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from io.vavr.collection.HashArrayMappedTrieModule.AbstractNode:
BUCKET_SIZEMAX_INDEX_NODEMIN_ARRAY_NODESIZE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract int
hash()

public boolean
pack-priv abstract K
key()

pack-priv static <K, V> HashArrayMappedTrieModule.AbstractNode<K, V>
pack-priv abstract V
Inherited from io.vavr.collection.HashArrayMappedTrieModule.AbstractNode:
containsKeyfromBitmapgetgetOrElsehashFragmentinsertiteratorkeysIteratorlookuplookupmodifynodesputremoveremovetoBitmaptoStringupdatevaluesIterator

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.serialVersionUID, io.vavr.collection.HashArrayMappedTrie.serialVersionUID.

Constructor Detail

LeafNodeback to summary
public LeafNode()

Method Detail

hashback to summary
pack-priv abstract int hash()
isEmptyback to summary
public boolean isEmpty()

Implements io.vavr.collection.HashArrayMappedTrie.isEmpty.

Annotations
@Override
keyback to summary
pack-priv abstract K key()
mergeLeavesback to summary
pack-priv static <K, V> HashArrayMappedTrieModule.AbstractNode<K, V> mergeLeaves(int shift, HashArrayMappedTrieModule.LeafNode<K, V> leaf1, HashArrayMappedTrieModule.LeafSingleton<K, V> leaf2)
valueback to summary
pack-priv abstract V value()
io.vavr.collection back to summary

public Class HashArrayMappedTrieModule.LeafNodeIterator<K, V>

extends AbstractIterator<HashArrayMappedTrieModule.LeafNode<K, V>>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int[]
private int
private static final int
private final Object[]
private int
private final int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static <K, V> int
downstairs(Object[] nodes, int[] indexes, HashArrayMappedTrieModule.AbstractNode<K, V> root, int level)

private Object
private static <K, V> HashArrayMappedTrieModule.AbstractNode<K, V>
protected HashArrayMappedTrieModule.LeafNode<K, V>
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

Inherited from io.vavr.collection.AbstractIterator:
nexttoString

Field Detail

indexesback to summary
private final int[] indexes
levelback to summary
private int level
MAX_LEVELSback to summary
private static final int MAX_LEVELS
nodesback to summary
private final Object[] nodes
ptrback to summary
private int ptr
totalback to summary
private final int total

Constructor Detail

LeafNodeIteratorback to summary
pack-priv LeafNodeIterator(HashArrayMappedTrieModule.AbstractNode<K, V> root)

Method Detail

downstairsback to summary
private static <K, V> int downstairs(Object[] nodes, int[] indexes, HashArrayMappedTrieModule.AbstractNode<K, V> root, int level)
findNextLeafback to summary
private Object findNextLeaf()
Annotations
@SuppressWarnings:unchecked
getChildback to summary
private static <K, V> HashArrayMappedTrieModule.AbstractNode<K, V> getChild(HashArrayMappedTrieModule.AbstractNode<K, V> node, int index)
Annotations
@SuppressWarnings:unchecked
getNextback to summary
protected HashArrayMappedTrieModule.LeafNode<K, V> getNext()

Implements abstract io.vavr.collection.AbstractIterator.getNext.

Annotations
@SuppressWarnings:unchecked
@Override
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
io.vavr.collection back to summary

public final Class HashArrayMappedTrieModule.LeafSingleton<K, V>

extends HashArrayMappedTrieModule.LeafNode<K, V>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Type Parameters
<K>
Key type
<V>
Value type

Representation of a HAMT leaf node with single element.

Field Summary

Modifier and TypeField and Description
private final int
private final K
private static final long
private final V

Constructor Summary

AccessConstructor and Description
pack-priv
LeafSingleton(int hash, K key, V value)

Method Summary

Modifier and TypeMethod and Description
private boolean
equals(int keyHash, K key)

pack-priv int
pack-priv K
pack-priv Option<V>
lookup(int shift, int keyHash, K key)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

pack-priv V
lookup(int shift, int keyHash, K key, V defaultValue)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

pack-priv HashArrayMappedTrieModule.AbstractNode<K, V>
modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.modify.

public Iterator<HashArrayMappedTrieModule.LeafNode<K, V>>
public int
pack-priv V
Inherited from io.vavr.collection.HashArrayMappedTrieModule.LeafNode:
isEmptymergeLeaves

Field Detail

hashback to summary
private final int hash
keyback to summary
private final K key
Annotations
@SuppressWarnings:serial
serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.vavr.collection.HashArrayMappedTrieModule.LeafNode.serialVersionUID, io.vavr.collection.HashArrayMappedTrie.serialVersionUID.

valueback to summary
private final V value
Annotations
@SuppressWarnings:serial

Constructor Detail

LeafSingletonback to summary
pack-priv LeafSingleton(int hash, K key, V value)

Method Detail

equalsback to summary
private boolean equals(int keyHash, K key)
hashback to summary
pack-priv int hash()

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.LeafNode.hash.

Annotations
@Override
keyback to summary
pack-priv K key()

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.LeafNode.key.

Annotations
@Override
lookupback to summary
pack-priv Option<V> lookup(int shift, int keyHash, K key)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

Annotations
@Override
lookupback to summary
pack-priv V lookup(int shift, int keyHash, K key, V defaultValue)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.lookup.

Annotations
@Override
modifyback to summary
pack-priv HashArrayMappedTrieModule.AbstractNode<K, V> modify(int shift, int keyHash, K key, V value, HashArrayMappedTrieModule.Action action)

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.modify.

Annotations
@Override
nodesback to summary
public Iterator<HashArrayMappedTrieModule.LeafNode<K, V>> nodes()

Overrides io.vavr.collection.HashArrayMappedTrieModule.AbstractNode.nodes.

Annotations
@Override
sizeback to summary
public int size()

Implements io.vavr.collection.HashArrayMappedTrie.size.

Annotations
@Override
valueback to summary
pack-priv V value()

Implements abstract io.vavr.collection.HashArrayMappedTrieModule.LeafNode.value.

Annotations
@Override