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>
See Also:
  • Field Details

  • Constructor Details

    • TrieEntry

      public TrieEntry(K key, V value, int bitIndex)
      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

      public String toString()
      Overrides:
      toString in class AbstractBitwiseTrie.BasicEntry<K,V>