Class AbstractPatriciaTrie.TrieEntry<K,V>
java.lang.Object
org.apache.commons.collections4.trie.AbstractBitwiseTrie.BasicEntry<K,V>
org.apache.commons.collections4.trie.AbstractPatriciaTrie.TrieEntry<K,V>
- Type Parameters:
K- the key type.V- the value type.
- All Implemented Interfaces:
Serializable,Map.Entry<K,V>
- Enclosing class:
AbstractPatriciaTrie<K,V>
protected static class AbstractPatriciaTrie.TrieEntry<K,V>
extends AbstractBitwiseTrie.BasicEntry<K,V>
A
Trie is a set of AbstractPatriciaTrie.TrieEntry nodes.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe index this entry is comparing.protected AbstractPatriciaTrie.TrieEntry<K, V> The left child of this entry.protected AbstractPatriciaTrie.TrieEntry<K, V> The parent of this entry.protected AbstractPatriciaTrie.TrieEntry<K, V> The entry who uplinks to this entry.protected AbstractPatriciaTrie.TrieEntry<K, V> The right child of this entry.private static final longFields inherited from class org.apache.commons.collections4.trie.AbstractBitwiseTrie.BasicEntry
key, value -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.commons.collections4.trie.AbstractBitwiseTrie.BasicEntry
equals, getKey, getValue, hashCode, setKeyValue, setValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
bitIndex
protected int bitIndexThe index this entry is comparing. -
parent
The parent of this entry. -
left
The left child of this entry. -
right
The right child of this entry. -
predecessor
The entry who uplinks to this entry.
-
-
Constructor Details
-
TrieEntry
Constructs a new instance.- Parameters:
key- The entry's key.value- The entry's value.bitIndex- The entry's bitIndex.
-
-
Method Details
-
isEmpty
public boolean isEmpty()Tests whether the entry is storing a key. Only the root can potentially be empty, all other nodes must have a key.- Returns:
- Whether the entry is storing a key
-
isExternalNode
public boolean isExternalNode()Tests whether the left or right child is a loopback.- Returns:
- Whether the left or right child is a loopback.
-
isInternalNode
public boolean isInternalNode()Tests that neither the left nor right child is a loopback.- Returns:
- That neither the left nor right child is a loopback.
-
toString
- Overrides:
toStringin classAbstractBitwiseTrie.BasicEntry<K,V>
-